Skip to content

messageReactionAdd event doesn’t word anymore without explanation

I’m working on a discord bot which adds the role “Voteur” when a user reacts on a embed message created by the bot. Until today it has worked great, but I don’t know why doesn’t word anymore.

The bot creates the embed message and add the reactions but nothing happens when a user reacts!

Are there any changes that I don’t know about in the discord.js v12 API?

Here is my code (it’s the file of the !vote command which triggers the embed message):

const Discord = require('../node_modules/discord.js');
const bot = new Discord.Client();
const rappelVote = require('./rappelVote');
const { roleVoteur, image, thumbnail  } = require('..//config.js');
module.exports = function embedVote (channel) {         //Affichage pour les votes
    const voteEmbed = new Discord.MessageEmbed()    //Construction du Embed
        .setTitle("Votez pour Fever sur TopServeur !")
        .setDescription("Pour recevoir des rappels de vote et soutenir le serveur, réagissez avec 📨")
        .setFooter("Pour ne plus recevoir les rappels : 🚫")
    .then(message => { // envoi une réaction grâce a la promise
        bot.on('messageReactionAdd', (reaction, user) => { // on vérifie que ce soit bien la bonne réaction et on ne compte pas celui du bot
            const member = message.guild.members.cache.get(;
            const voteur = message.guild.roles.cache.get(roleVoteur);
            if ( === '📨' && !== {
            if ( === '🚫' && !== {
    channel.send("<@&" + roleVoteur + ">");

How can I make this work again?


The problem is probably that you are creating a new Discord.Client() instead of requiring the current one. You should edit your function parameters to include a bot object:

function embedVote (channel, bot) {}

This way you’ll be using the correct instance of your client. Example of calling this function correctly:

// if function is being triggered via command
embedVote(, message.client);
// or something like:
embedVote(bot.channels.cache.get('Channel ID'), bot);