Discord Collector Filter

Also, I'm creating a staff application bot where I need to send a dm when an user executes the /apply command, Right now it sends the embed but I don't understand which type of message collector i have to use and which could be the filters to it, and I don't have any clue on how to send the other questions when the user answered to the first one
4 Replies
d.js toolkit
d.js toolkit•7mo 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!
davy
davy•7mo ago
Also from my experience with modals they can bug sometimes and from the mobile prospective i don't find them so good
d.js docs
d.js docs•7mo ago
:method: DMChannel#createMessageCollector @main Creates a Message Collector.
// Create a message collector
const filter = message => message.content.includes('discord');
const collector = channel.createMessageCollector({ filter, time: 15_000 });
collector.on('collect', message => console.log(`Collected ${message.content}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
// Create a message collector
const filter = message => message.content.includes('discord');
const collector = channel.createMessageCollector({ filter, time: 15_000 });
collector.on('collect', message => console.log(`Collected ${message.content}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
davy
davy•7mo ago
yeah but in my case which could be the filter? this is the only thing i don't really understand like, should i really create a filter? because i don't think in my case is needed and lets say i want to send another question when the user answered to the first, how could that work?
Want results from more Discord servers?
Add your server