Closed Tatatofly closed 3 years ago
/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298 throw new DiscordAPIError(data, res.status, request); ^ DiscordAPIError: Request entity too large at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14) at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) { method: 'post', path: '/channels/880860139622645823/messages', code: 40005, httpStatus: 413, requestData: { json: { content: undefined, tts: false, nonce: undefined, embeds: undefined, components: undefined, username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: undefined, message_reference: undefined, attachments: undefined, sticker_ids: undefined }, files: [ { attachment: 'https://random.dog/74832f72-1f1d-471b-a171-781b5c9391a6.gif', name: '74832f72-1f1d-471b-a171-781b5c9391a6.gif', file: PassThrough { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [BufferList], length: 0, pipes: [], flowing: true, ended: true, endEmitted: true, reading: false, constructed: true, sync: false, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, errored: null, closed: true, closeEmitted: true, defaultEncoding: 'utf8', awaitDrainWriters: null, multiAwaitDrain: false, readingMore: false, dataEmitted: true, decoder: null, encoding: null, [Symbol(kPaused)]: false }, _events: [Object: null prototype] { prefinish: [Function: prefinish], error: [Array], data: [Function: bound ] }, _eventsCount: 3, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: true, destroyed: true, decodeStrings: true, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, afterWriteTickInfo: null, buffered: [], bufferedIndex: 0, allBuffers: true, allNoop: true, pendingcb: 0, constructed: true, prefinished: true, errorEmitted: false, emitClose: true, autoDestroy: true, errored: null, closed: true, closeEmitted: true, [Symbol(kOnFinished)]: [] }, allowHalfOpen: true, emit: [Function (anonymous)], [Symbol(kCapture)]: false, [Symbol(kCallback)]: null } } ] } }
Added filesize cheker for the api