Collectors just do not work

i'm making a minecraft crafting table in discord and it (should) work by listening for replies and adding materials to the table by editing the original message, but the collector doesn't do anything i copied this 1:1 from the documentation:
// `m` is a message object that will be passed through the filter function
const collectorFilter = m => m.content.includes('discord');
const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15000 });

collector.on('collect', m => {
console.log(`Collected ${m.content}`);
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});
// `m` is a message object that will be passed through the filter function
const collectorFilter = m => m.content.includes('discord');
const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15000 });

collector.on('collect', m => {
console.log(`Collected ${m.content}`);
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});
and saying "discord" doesn't output anything in the terminal i really feel like i'm not putting enough info here but it literally just does not work or error or anything [email protected] node -v v21.1.0
3 Replies
d.js toolkit
d.js toolkit13mo 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
treble/luna
treble/luna13mo ago
do you have the Guilds, GuildMessages and MessageContent intent
moonlumen
moonlumenOP13mo ago
oh fuck im dumb thanks
Want results from more Discord servers?
Add your server