Follow Up to interaction.deferUpdate() throws error

Hey guys, When I try to followUp() to an ButtonInteraction I get the error InteractionAlreadyReplied. A print of interaction.deferred (true) and interaction.replied (false) shows that it is clearly not already replied. What am I missing here?
8 Replies
d.js toolkit
d.js toolkit10mo 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
ShowCast
ShowCastOP10mo ago
DJS Version: 14.14.1 NodeJS Version: 18.17.1 First I call await interaction.deferUpdate(); After that I fetch some data. And after some lines of fetching data comes
await interaction.followUp({
content: await resolveKey(interaction, Language.buildCommandTranslationKey(TranslationKeys.lfg.request_partyleader_cannot_join)),
ephemeral: true
});
await interaction.followUp({
content: await resolveKey(interaction, Language.buildCommandTranslationKey(TranslationKeys.lfg.request_partyleader_cannot_join)),
ephemeral: true
});
I checked like 10x times. there is no interaction.reply() or anything else between those calls
monbrey
monbrey10mo ago
followUp shouldnt be able to throw that error. Can you try editReply() as a test? Or show the error stack
ShowCast
ShowCastOP10mo ago
Sure. I am using sapphire as a framework but here you go
2024-03-14 10:59:39 - ERROR - Encountered error while handling an interaction handler parse method for interaction-handler "lfgRequestButtons" at path "C:\Users\paulh\Documents\Projects\discord-bot\dist\interaction-handlers\button\lfgRequestButtons.js" Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
2024-03-14 10:59:39 - ERROR - at ButtonInteraction.deferUpdate (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:199:46)
2024-03-14 10:59:39 - ERROR - at LfgRequestButtons.parse (C:\Users\paulh\Documents\Projects\discord-bot\dist\interaction-handlers\button\lfgRequestButtons.js:62:35)
2024-03-14 10:59:39 - ERROR - at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\InteractionHandlerStore.cjs:22:68
2024-03-14 10:59:39 - ERROR - at Object.fromAsync (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\result\dist\cjs\index.cjs:619:46)
2024-03-14 10:59:39 - ERROR - at _InteractionHandlerStore.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\InteractionHandlerStore.cjs:22:44)
2024-03-14 10:59:39 - ERROR - at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-03-14 10:59:39 - ERROR - at async _CoreListener.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\listeners\CoreInteractionCreate.cjs:21:7)
2024-03-14 10:59:39 - ERROR - at async Object.fromAsync (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\result\dist\cjs\index.cjs:619:22)
2024-03-14 10:59:39 - ERROR - at async _CoreListener._run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\Listener.cjs:27:22) {
2024-03-14 10:59:39 - ERROR - code: 'InteractionAlreadyReplied'
2024-03-14 10:59:39 - ERROR - }
2024-03-14 10:59:39 - ERROR - Encountered error while handling an interaction handler parse method for interaction-handler "lfgRequestButtons" at path "C:\Users\paulh\Documents\Projects\discord-bot\dist\interaction-handlers\button\lfgRequestButtons.js" Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
2024-03-14 10:59:39 - ERROR - at ButtonInteraction.deferUpdate (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:199:46)
2024-03-14 10:59:39 - ERROR - at LfgRequestButtons.parse (C:\Users\paulh\Documents\Projects\discord-bot\dist\interaction-handlers\button\lfgRequestButtons.js:62:35)
2024-03-14 10:59:39 - ERROR - at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\InteractionHandlerStore.cjs:22:68
2024-03-14 10:59:39 - ERROR - at Object.fromAsync (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\result\dist\cjs\index.cjs:619:46)
2024-03-14 10:59:39 - ERROR - at _InteractionHandlerStore.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\InteractionHandlerStore.cjs:22:44)
2024-03-14 10:59:39 - ERROR - at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-03-14 10:59:39 - ERROR - at async _CoreListener.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\listeners\CoreInteractionCreate.cjs:21:7)
2024-03-14 10:59:39 - ERROR - at async Object.fromAsync (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\result\dist\cjs\index.cjs:619:22)
2024-03-14 10:59:39 - ERROR - at async _CoreListener._run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@sapphire\framework\dist\cjs\lib\structures\Listener.cjs:27:22) {
2024-03-14 10:59:39 - ERROR - code: 'InteractionAlreadyReplied'
2024-03-14 10:59:39 - ERROR - }
Same error with editReply() btw
monbrey
monbrey10mo ago
Well this is being thrown by deferUpdate() Long before either followUp or editReply
ShowCast
ShowCastOP10mo ago
So you mean something defers the interaction even before my deferUpdate() call?
monbrey
monbrey10mo ago
seems that way
ShowCast
ShowCastOP10mo ago
Alright thank you for your help :PES_Ok: :aPES_Love:
Want results from more Discord servers?
Add your server