#4 Large playlist requests trigger API limit

Terbuka
dibuka 3 tahun lalu oleh tarfeef101 · 0 komentar

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
Masuk untuk bergabung dalam percakapan ini.
Tidak ada tonggak
Tidak ada penerima
1 Peserta
Memuat...
Batal
Simpan
Belum ada konten.