#4 Large playlist requests trigger API limit

Open
opened 3 years ago by tarfeef101 · 0 comments

Trying to ask for !playlist on a large playlist results in an API failure due to the text being passed being too large, error output below

viki_1  | DiscordAPIError: Invalid Form Body
viki_1  | content: Must be 4000 or fewer in length.
viki_1  |     at RequestHandler.execute (/home/tdedhar/src/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
viki_1  |     at runMicrotasks (<anonymous>)
viki_1  |     at processTicksAndRejections (node:internal/process/task_queues:93:5)
viki_1  |     at async RequestHandler.push (/home/tdedhar/src/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
viki_1  |   method: 'post',
viki_1  |   path: '/channels/434770569204989952/messages',
viki_1  |   code: 50035,
viki_1  |   httpStatus: 400
viki_1  | }

probably should make a safe postmessage function to handle posting stuff, and splitting as needed

Trying to ask for `!playlist` on a large playlist results in an API failure due to the text being passed being too large, error output below ``` viki_1 | DiscordAPIError: Invalid Form Body viki_1 | content: Must be 4000 or fewer in length. viki_1 | at RequestHandler.execute (/home/tdedhar/src/node_modules/discord.js/src/rest/RequestHandler.js:154:13) viki_1 | at runMicrotasks (<anonymous>) viki_1 | at processTicksAndRejections (node:internal/process/task_queues:93:5) viki_1 | at async RequestHandler.push (/home/tdedhar/src/node_modules/discord.js/src/rest/RequestHandler.js:39:14) { viki_1 | method: 'post', viki_1 | path: '/channels/434770569204989952/messages', viki_1 | code: 50035, viki_1 | httpStatus: 400 viki_1 | } ``` probably should make a safe postmessage function to handle posting stuff, and splitting as needed
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.