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 discord.js@14.13.0 node -v v21.1.0
3 Replies
d.js toolkit
d.js toolkit9mo 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/luna9mo ago
do you have the Guilds, GuildMessages and MessageContent intent
moonlumen
moonlumen9mo ago
oh fuck im dumb thanks