#Filter of collectors do not work

1 messages · Page 1 of 1 (latest)

reef mortar

Hi,
I have a problem with filter of the collectors:
When I apply a filter it does not take in charge.
Here is an example :

const filter = e => e.message.id == interaction.message.id && e.user.id == interaction.user.id
const collector = interaction.channel.createMessageComponentCollector({ filter, time: 60000, max: 1 });
collect.on('collect', async i => {
console.log(`Allowed user`)
})

This code should allow only the author of the slash command to trigger the collector and the console.log, except that any user can do it, the filter does not work.
Is this a discordjs issue?