How can I stop this collector if component disappears (for example, ephemeral msg closed)

I want this collector to stop if the entire message is closed. The interaction is "unknown" if I run the command and use the component a second time.
No description
4 Replies
d.js toolkit
d.js toolkit8mo ago
- 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! - Marked as resolved by OP
Swyftey
SwyfteyOP8mo ago
I know I can just stop the collector after the select menu is selected once, but I want to know if there is a way to stop it so that it can still be re-selected
d.js docs
d.js docs8mo ago
If you are waiting for button or select menu input from a specific message, don't create the collector on the channel. - Channel collectors return component interactions for any component within that channel.
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)
Swyftey
SwyfteyOP8mo ago
thank you
Want results from more Discord servers?
Add your server