Interaction already deferred.
https://github.com/KiraKenjiro/bot
The bot at the moment works almost perfectly. qj's been a saviour and helped me with it but i am struggling with once thing. as the model embed is sent, (via clicking on the modalsEmbed button that was sent in the embed command) there is a 5 minute timer that is started. After 5 minutes has elapsed, if the user hasn’t filled in the consent form (checked by ckecing if there is a value in the consent field in the (i think) accounts table).
(at the moment it's set to i think 45 seconds just for testing. e.g. 0.45 * 60 * 1000)
But when the timer elapsed I got this error. (Provided half log)
I think... It's talking about this section of code from lines 81 to 89 in the file modalsEmbed.js
(There is an issue where i forgot to update it with the right description but, you get the idea it would update it to something like, oops, form timed out)
I'm not entirely too sure whats happening but it may be due to the embed being sent at 102 to 106 as, i have a slight feeling thats the interaction i want to update and im trying to update the interaction before. This is just a guess but i'd love a second opinion on this <3
--- Edit: I'm pretty sure im trying to edit the interaction before the interaction i want to edit. not too sure if thats worded right but alas
GitHub
GitHub - KiraKenjiro/bot
Contribute to KiraKenjiro/bot development by creating an account on GitHub.
4 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 OPSomeone please fact check me but to get the interaction of the embed from 102 to 106. I can do this
Then i can just move the timer logic after that reply.
-
DiscordAPIError: Interaction has already been acknowledged
- [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
You have already replied to the interaction.
- Use <Interaction>.followUp()
to send a new message
- If you deferred reply it's better to use <Interaction>.editReply()
- Responding to slash commands / message componentsOhhh!! Alright i'll give that a try <3
Yeah that worked, Turns out you can update, Edit if you deferred! Thanks krum :D