Unknown interaction
Hello
I have a problem that I can't figure out. I understand the principle of deferring an answer, but in this case I'm having trouble.
What I'd like to do: Change the embed and the drop-down menu each time an answer is selected:
It works great!
But from time to time (very rarely), this error is generated:
DiscordAPIError[10062]: Unknown interaction
How to correct it?
Thanks!12 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!It means you took longer than 3s to respond
I can defer() an update() ?
StringSelectMenuInteraction#update()
Updates the original message of the component on which the interaction was received on.
wait
StringSelectMenuInteraction#deferUpdate()
Defers an update to the message to which the component was attached.
Thank you
I'm trying to reproduce the problem: if I wait 20 seconds (for example) to select an answer, it updates correctly without using defer().
the time you wait has nothing to do here
Oh no, okay, I misunderstood: we're talking about the server that takes more than 3 sec.
yes
Sorry !
I'll test that, many thanks! 🙌
This means I can postpone my update. But when I update my component, I get the error :
Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred
You have to use editReply