#4 Large playlist requests trigger API limit

Avoinna
3 vuotta sitten avasi tarfeef101 · 0 kommenttia

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
Kirjaudu sisään osallistuaksesi tähän keskusteluun.
Ei merkkipaalua
Ei osoitettua
1 osallistujaa
Ladataan...
Peruuta
Tallenna
Sisältöä ei vielä ole.