Error in translate command "Unknown interaction"
Hello, this is a code for a translate command via contextmenu command, i cant figure out what in the code is causing this error. This error occurs sometimes. Can anyone with more coding experience than me see what could be the issue.
9 Replies
- 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 OPCommon 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@astro its probably because of "Initial response took more than 3 seconds", but when i do deferreply, the ephemeral doesnt work anymore
What do you mean "doesnt work anymore"??
ephemeral true doesnt show up as a view only message anymore then
Does it reply as a regular message?
Like viewable by everyone?
yes the translations, but not the error messages
You need to do .editReply, not .reply if a response is defered
but then everything will be in ephemeral: true?
This is my code now, i think deferreply fixed my error but now the error messages arent in ephemeral: true.
these two:
'ℹ️ This text was already recently translated, please look back in chat'
'ℹ️ This message seems to be in English already or it might just be gibberish I cannot translate'
no the translation not, only the error messages should be ephemeral (see above)
thank you