Search code examples
javascriptnode.jsdiscorddiscord.js

Discord JS v13 Reaction Collector not working


I've been trying for a really long time to make it work, I tried the await version too but none of them collect the reactions. The collector completes its cycle, but then it shows that no reaction was collected.

        if (command == 'react') {

        const filter = (reaction,user) => {
            return user.id === message.author.id;
        }
        
        const collector = message.createReactionCollector({
            filter,
            max: 1,
            time: 1000 * 5,
        })

        collector.on('collect',(reaction) =>{
            console.log(reaction.emoji);
        })

        collector.on('end',(collected) =>{
            console.log(collected);
        })
    }

Solution

  • check if you bot have the GUILD_MESSAGE_REACTIONS intent activated, you need it to make the collector work