title: Add a role to people that react with a certain emoji in a certain channel
body: <p>I'm trying to make a discord.js bot for my server I made for people in my school. I'm trying to make a <code>#classes</code> channel and if you react to certain messages it gives you a role (which gives you access to the text channel for that class).</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>client.on('messageReactionAdd', (reaction, user) =&gt; {
    console.log("client.on completed.")
    if (message.channel.name === 'classes') {
      console.log("if(message) completed.")
      if (reaction.emoji.name === "reminder_ribbon") {
        console.log("emoji test completed.")
        const guildMember = reaction.message.guild.members.get(user.id);
        const role = reaction.message.guild.roles.find(role =&gt; role.name === "FACS");
        guildMember.addRole(role);
      }
    }
  });
  </code></pre>
  
  <p>This is what I have tried so far, however, it does not give me/the other people reacted to it the role nor does it return an error message.</p>
  
  <p>P.S. Also, how would I be able to make it so when they unreact it removes the role?</p>
  
  <p>Edit: It seems it only gets reactions from cached messages/messages sent after bot startup.  Also, message is not defined on the first if(message.channel.id) message.</p>