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 crash #1157

Open
3 tasks done
AdamSaketume26 opened this issue Apr 28, 2024 · 1 comment
Open
3 tasks done

DiscordAPIError: Invalid Form Body crash #1157

AdamSaketume26 opened this issue Apr 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@AdamSaketume26
Copy link

Which package has the bugs?

The core library

Issue description

When I try to click buttons sometimes my code crashes. is this because i am using more than one client and rate limit? but http status is 400 and not ratelimit. i am checking to see if button is disabled before clicks but it still gives me error and crashes my script even if i put try and catch before the button click

c:\discord\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:415
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Invalid Form Body
COMPONENT_VALIDATION_FAILED: Component validation failed
at RequestHandler.execute (c:\discord\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:415:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (c:\discord\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:63:14) {
method: 'post',
path: '/interactions',
code: 50035,
httpStatus: 400,
requestData: {
json: {
type: 3,
nonce: '1111111111111111111',
guild_id: '1111111111111111111',
channel_id: '1111111111111111111',
message_id: '1111111111111111111',
application_id: '1111111111111111111',
session_id: 'numbers and letters',
message_flags: 0,
data: [Object]
},
files: [],
headers: undefined
},
retries: 0,
captcha: null
}

Code sample

await message.clickButton("id");

Package version

3.1.4 github

Node.js version

20.12.2

Operating system

No response

Priority this issue should have

Low (slightly annoying)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@AdamSaketume26 AdamSaketume26 added the bug Something isn't working label Apr 28, 2024
@JueXiuHuang
Copy link

I have the same problem, do you find any method to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants