moonlumen
moonlumen
DIAdiscord.js - Imagine an app
Created by moonlumen on 11/5/2023 in #djs-questions
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
5 replies