#4 Large playlist requests trigger API limit

오픈
tarfeef1013 년 전을 오픈 · 0개의 코멘트
tarfeef101 코멘트됨, 3 년 전

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
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 1명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.