#4 Large playlist requests trigger API limit

Ouvert
Créé il y a 3 ans par tarfeef101 · 0 commentaires

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
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataire
1 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.