Await reaction to add and remove role on custom emoji's

Viewed 28

Hey there im working on reaction roles, now on custom emojis role add and remove do not work, whiles for normal emoji's it works perfectly. Any way to make this workin?

First line is working whilest second is not!

if (reaction.emoji.name === "✅") {
  await reaction.message.guild.members.cache.get(user.id).roles.add("996019880765702154");
  await reaction.users.remove(user.id);
}
if (reaction.emoji.id === "<:female:996009905720918076>") {
  await reaction.message.guild.members.cache.get(user.id).roles.add("996020079420510208");
  await reaction.users.remove(user.id);
}
1 Answers

Fixed by making:

const FEmoji = message.guild.emojis.cache.get("996009905720918076");

And using:

if (reaction.emoji.name === TGEmoji.name) {await reaction.message.guild.members.cache.get(user.id).roles.add("996020079420510208"); await reaction.users.remove(user.id);}
Related