Discord.js reaction collector wont work with custom emojis

I have been having a problem while coding my bot where my reaction collector will work with Unicode emojis, but not my server’s custom emojis. I want the reaction to send a message into the channel. It currently only works with Unicode emojis. Is there a certain way I should be doing this?

        .then(collected => {
          const reaction = collected.first();

          if (reaction.emoji.name === "😀") {
            message.channel.send("Smile")
            
          }
          
          if (reaction.emoji.name === "<:Peasant:797613974173515786>") {
            message.channel.send("Peasant")
          }
        
          
        })```

16 thoughts on “Discord.js reaction collector wont work with custom emojis”

Leave a Comment