End StringSelectMenu Collector (to avoid Unknown Interaction or InteractionAlreadyReplied)

Hi, I have a command which use a StringSelectMenu and Buttons. When the command is over, if I use it again I have an error InteractionAlreadyReplied or Unknown Interaction. I think the problem comes from the StringSelectMenu because if I wait I see it disabling itself. I aim to end this collector (and not the buttons which are useful after selection) to avoid errors if I use the command again (and without have to put a 45secs cooldown for the command) but I don't really know how achieve that. If someone has an idea it would be great Thx by advance Code: https://sourceb.in/OxOZFJiZOU
SourceBin
Fragment
Instantly share your code with the world.
2 Replies
d.js toolkit
d.js toolkit6mo 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!
d.js docs
d.js docs6mo 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(…)
discord.js uses Collection, an extension of the JS native Map structure. - Guide: learn more 🍪
Want results from more Discord servers?
Add your server