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
- 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 OPalso another question did
Interaction.awaitModalSubmit
already set the componentType to modal for the collector?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
sorry i meant the collect event
It emits when an interaction that passes the provided filter is received
okok, if i set the
componentType
in the options, does it need to pass that as well?to clarify, modals aren't components
but
awaitModalSubmit
does set the interactionType
, yesokk
if you're setting the
componentType
, you do not need to filter by component type
it would already do that internallyokok tyty