Browse Source

Use equals instead of greater than to prevent the message from being sent multiple times

master
Abheek Dhawan 4 years ago
parent
commit
2085b9ace5
  1. 2
      index.js

2
index.js

@ -686,7 +686,7 @@ client.on('messageReactionAdd', (messageReaction, user) => {
}
if (result.kulboard_id) {
kulboardChannel = result.kulboard_id;
if (messageReaction.message.guild.channels.cache.get(kulboardChannel) && messageReaction.emoji.name === "😎" && messageReaction.count > 3) {
if (messageReaction.message.guild.channels.cache.get(kulboardChannel) && messageReaction.emoji.name === "😎" && messageReaction.count = 4) {
messageReaction.message.guild.channels.cache.get(kulboardChannel).send(kulboardEmbed).catch(console.error);
}
}

Loading…
Cancel
Save