Unknown Interaction on awaitModalSubmit()

Hi everyone, im kinda scratching my head here trying to figure out whats going on. https://pastebin.com/dRXw5Ffm Behaviour im experiencing: if the user opens the modal using the button, fills out the info and submits it all works great. HOWEVER if the user opens the modal, fills some info in, CANCELS the modal, then reopens it and finishes filling the info then submits.....I get an "unknown interaction" when replying in the on submit function despite the database calls still updating everything as they should?
Pastebin
if ( interaction.customId === commandConfig....
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
2 Replies
d.js toolkit
d.js toolkit16mo 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!
Shinykey
ShinykeyOP16mo ago
Again it works as it should if the user does not press cancel and fills it out but if they hit cancel then i start getting the error Appreciate the reply! This is an odd issue and you are correct it’s replying multiple times to the modal. I’m not sure I quite understand the nonce, what are you referring too? ah I see, ok! thanks I will try that 😄 Thank you that solution does work! I also realized and alternative to the solution. I am running DB calls before I return, and the DB is smart enough to detect a duplicate call. So I can also leverage that knowledge thanks all!!
Want results from more Discord servers?
Add your server