weird UnknownInteractionError

i've sent my slashCommand file, i just get randomly UnknownInteractionError on the first run of command.
14 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Kryp Arnold
Kryp ArnoldOP13mo ago
its so confusing i've tried so many runs, but it just happens randomly
d.js docs
d.js docs13mo ago
Tag suggestion for @esek zeytin: Common causes of DiscordAPIError[10062]: Unknown interaction: - Initial response took more than 3 seconds ➞ defer the response *. - Wrong interaction object inside a collector. - Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance) * Note: you cannot defer modal or autocomplete value responses
Kryp Arnold
Kryp ArnoldOP13mo ago
oh it must be the database call then
Danial
Danial13mo ago
Because the interaction reply took less than 3 seconds sometimes and more the other times, you should defer the reply Yep
Kryp Arnold
Kryp ArnoldOP13mo ago
what defer does actually?
Danial
Danial13mo ago
It basically tells Discord you need more time to respond and shows a Bot is thinking... message that you can edit within 15 minutes
Kryp Arnold
Kryp ArnoldOP13mo ago
oh i read the guide, thanks
d.js docs
d.js docs13mo ago
guide Slash Commands: Command response methods - Deferred responses read more
Kryp Arnold
Kryp ArnoldOP13mo ago
thank you so much man
Danial
Danial13mo ago
Ah nice, and of course
Kryp Arnold
Kryp ArnoldOP13mo ago
anything you wanna say?
Danial
Danial13mo ago
Nope, that's it
Kryp Arnold
Kryp ArnoldOP13mo ago
<3
Want results from more Discord servers?
Add your server