#Modal submiting

5 messages · Page 1 of 1 (latest)

craggy cipher
#

When a user uses a command, as example /say, a modal pops up using interaction.showModal(modal).
But when I use interaction.awaitModalSubmit() in the code of this command, I'm having the following issue:
When I use the command, close the modal, use the command again and submit the modal: the first command receives the second commands modal too. So I get 2 answers instead of only the last.
I also had an issue that it took other user's modals as well, but I fixed that with a member filter.

dim geyserBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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
rancid dome
#

use a random nonce in the modal's customId and filter for that in the awaitModalSubmit to only collect that one specific modal

past yacht
#

You can use the slash command interaction id as a random nonce

craggy cipher
#

That's a good idea. What's the limit of a customId again?