Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiscordAPIError: Invalid Form Body content: Must be 2000 or fewer in length. #53

Open
xandramax opened this issue Dec 8, 2021 · 1 comment
Labels

Comments

@xandramax
Copy link

Zork Zero crashes the bot at move 6 with the following console output:

discord-frotz\node_modules\discord.js\src\rest\RequestHandler.js:154
      throw new DiscordAPIError(request.path, data, request.method, res.status);
            ^

DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
    at RequestHandler.execute (C:\msys64\home\exander\Development\frotzbot\node-v16.13.0-win-x64\node_modules\discord-frotz\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (C:\msys64\home\exander\Development\frotzbot\node-v16.13.0-win-x64\node_modules\discord-frotz\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
  method: 'post',
  path: '/channels/910621836138676234/messages',
  code: 50035,
  httpStatus: 400
}

@ava-cassiopeia
Copy link
Owner

Ah this seems to be a case in which the bot is running up against the discord character limit for a single message. The obvious solution is to just split up messages that are too large, but that does potentially make formatting tricky. I'll look into this a little more when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants