Unknown interaction
The idea is to use a slash command to run a separate js file, which would reduce hunger and thirst. If any of the two arrived at 15, he would send a message, through the interaction, that he needed to drink, urgently. However, when I execute the slash command, and the js file is also executed afterwards, when sending the message through the interaction, when I reach 15, it says that the interaction is unknown.
3 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!console:
I've tried checking if the interaction is valid before executing and putting a catch block just in case. And, it still executes, and it stops at the catch block.
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 responses