Modals timeout
I'm trying to update my database with a modal input.
Is there a way to defer a modal like a deferReply() ?
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.it just say deferReply in the doc.
but when I do the deferReply, it return me Interaction has already been acknowledged.
Tag suggestion for @axiprime:
•
DiscordAPIError: Interaction has already been acknowledged
• [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
You have already replied to the interaction.
• Use <Interaction>.followUp()
to send a new message
• If you deferred reply it's better to use <Interaction>.editReply()
• Responding to slash commands / buttons / select menusYou can't defer interactions to show modal after, they need to be the first reply iirc, but if you are talking about deferring the ModalSubmitInteraction it's possible
I want to make a deferReply() then .ShowModal
You can't, showModal needs to be the first reply to an interaction
and in the modal I would like to know If I can make a defer also so it wait for my thing to be push in my Database
To defer modalSubmit interactions, Idris already answered you: https://discord.com/channels/222078108977594368/1012031847993184266/1012032060602470440
I will read it again I guess 😅
Stack Overflow
Modal Collector Discord.js
I was trying to create a collector for my modal using Discord.js. With the code below I don't get an error, but the modal fails in Discord and the code in collector.on never runs.
I have used a sim...
What I was looking is that.
You can make your modal with a timed collector so it does not time out after the 3 secs
Just use:
Documentation suggestion for @axiprime: ChatInputCommandInteraction#awaitModalSubmit()
Collects a single modal submit interaction that passes the filter. The Promise will reject if the time expires.
the like above is about that with a bigger example. But thanks ^^