{fixed ... kinda} What is DiscordAPIError: Invalid Form Body?


#1

(node:23261) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body

12:28 PM

content: Must be 2000 or fewer in length.

12:28 PM

at item.request.gen.end (/rbd/pnpm-volume/5417cfa4-bea3-43ec-90ae-634ba5a40d81/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:15)

12:28 PM

Jump to

at then (/rbd/pnpm-volume/5417cfa4-bea3-43ec-90ae-634ba5a40d81/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21)

12:28 PM

at <anonymous>

12:28 PM

at process._tickCallback (internal/process/next_tick.js:189:7)

12:28 PM

(node:23261) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

12:28 PM

(node:23261) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

What where is over 2k? I cannot access these files. The bot runs, but when you try to use any command (Even help) This happens, although it stays up.

project name is
Cookiebo


#2

Hey, this error occurs when the message you’re attempting to send a message via the Discord API that is over 2000 characters in length. If possible, try reducing the length of the messages you’re sending.