Nested Collector
If i have a button that opens up a modal, do i add the modal collector in the button collector or is there another way? Coming back to djs after a long time so my brain isnt braining.
or
9 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! ButtonInteraction#awaitModalSubmit()
Collects a single modal submit interaction that passes the filter. The Promise will reject if the time expires.
call that on the interaction you showed the modal on
Oh okay, and then if i want a series of buttons in it, like after modal submit theres another embed with button and i wanna do that is there a similar thing?
reply to the collected modal intefraction with that embed
though if you plan on making your buttons a single press, you're probably better off using the promisified collector
alright
thank you
whats the maximum time i can keep it running, any clue?
that can be anything really, just note they're not persistent
in non promisifed ones you can omit the time
the promisified ones will reject after the specified time
okay so i can even keep a button available for say, days
yeah
if you want it to be permanently available you'd have to use the interactionCreate event