Message Collector Filter not working

The filter is not working for some reason
console.log(codeValue);

const filterDelete = msg => msg.author.id === user.id && msg.content.toLowerCase() === `delete ${codeValue}`;

const collector = interaction.channel.createMessageCollector({ filter: filterDelete, time: 10_000 });
console.log(codeValue);

const filterDelete = msg => msg.author.id === user.id && msg.content.toLowerCase() === `delete ${codeValue}`;

const collector = interaction.channel.createMessageCollector({ filter: filterDelete, time: 10_000 });
Logs
cbz5yhifqx
cbz5yhifqx
what i type in the channel delete cbz5yhifqx collector
collector.on('collect', async (msg) => {
await msg.delete();
await Code.deleteOne({ _id: code._id });
interaction.editReply({ embeds: [success ] });
});
collector.on('collect', async (msg) => {
await msg.delete();
await Code.deleteOne({ _id: code._id });
interaction.editReply({ embeds: [success ] });
});
collector doesnt do anything
5 Replies
d.js toolkit
d.js toolkit16mo 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/luna16mo ago
do you have the required intents? (Guilds, GuildMessages and MessageContent)
PAdventures
PAdventuresOP16mo ago
not guildmessages? is that new?
treble/luna
treble/luna16mo ago
not really
PAdventures
PAdventuresOP16mo ago
oh... wierd ok thanks
Want results from more Discord servers?
Add your server