Opening modal causes an error message in chat but submission works as expected
Code is written using discord js v14.14.1
The code works to show the modal and it handles submission properly and returns the final reply formatted how I have set up. The issue is when I call the command and the modal pops up I can see in chat the message "There was an error while executing this command!" . I have tried adding an "interaction.reply()" immediatly after the .show modal command but that just gives an error saying the message has already been deferred. Any ideas on what causes the "There was an error while executing this command!" message and how i could prevent it?
2 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!"There was an error while executing this command!"this sounds like a generic error message your code is sending from wherever you're handling commands, presumably after catching an error if you don't see an error in your console, you should probably locate where this "There was an error while executing this command!" is being sent from (again presumably from wherever you're handling commands), and actually log the error