Issue with Modals
I get this error when submitting the modal and nothing comes up in console. I'm using a collector and it just isn't collecting?
15 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.You need to respond to the modal interaction for it to submit successfully
So you can't use collectors?
You can, if you collect and respond to it
So you have to use an event to respond to it, and then the collector will collect
I've got an update to that page pending which will include more info than that
uhhhh no, you dont do both
Something like that works
Cool, thank you. That also saves a lot of space compared to a messageComponentCollector
Modals also arent message components so that wouldnt have worked
How would you parse data from the
submission
variable?submission.options.getTextInputValue("custom id here")
Thank you
I'm getting
oh my bad
fields, not options
Okay, so i want to then edit the initial reply it sends however it says that the interaction has not been sent or deferred when I try use "submission.editReply"
Documentation suggestion for @larkx: ModalSubmitInteraction#update()
Updates the original message of the component on which the interaction was received on.