What is the event `collect` in `InteractionCollector`

https://discord.js.org/docs/packages/discord.js/14.15.3/InteractionCollector:Class#collect Did the interaction variable went through the filter or not?
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
10 Replies
d.js toolkit
d.js toolkit3mo 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
https://vsus.app
https://vsus.appOP3mo ago
also another question did Interaction.awaitModalSubmit already set the componentType to modal for the collector?
Mark
Mark3mo ago
The dispose event doesn't do anything on an interaction collector and should be ignored Unsure if it's there by accident or inherited from the base collector
https://vsus.app
https://vsus.appOP3mo ago
sorry i meant the collect event
Mark
Mark3mo ago
It emits when an interaction that passes the provided filter is received
https://vsus.app
https://vsus.appOP3mo ago
okok, if i set the componentType in the options, does it need to pass that as well?
duck
duck3mo ago
to clarify, modals aren't components but awaitModalSubmit does set the interactionType, yes
https://vsus.app
https://vsus.appOP3mo ago
okk
duck
duck3mo ago
if you're setting the componentType, you do not need to filter by component type it would already do that internally
https://vsus.app
https://vsus.appOP3mo ago
okok tyty
Want results from more Discord servers?
Add your server