Buttons
https://srcshare.io/64bc52f9fa3442a7f7ec6724
The bot sends:
this interaction failed
, no errors on the console.SrcShare
Easily share your source code with other developers.
5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Post the full error stack trace, not just the top part!
- Show your code!
- Explain what exactly your issue is.
- Not a discord.js issue? Check out #useful-servers.
- Issue solved? Press the button!You catch the errors but don’t log anything. Try to console.log the error in your catch block.
Tag suggestion for @specialsauce:
Common causes of
DiscordAPIError[10062]: Unknown interaction
:
- Initial response took more than 3 seconds ➞ defer the response *.
- Wrong interaction object inside a collector.
* Note: you cannot defer modal or autocomplete value responsesThis is what I get if I log the error
Then you have your answer.
Defer or reply sooner
And if this is a button handler you should be checking if it’s a button interaction before calling run()