Browse Source

Make sure reaction count is within a limit

master
Abheek Dhawan 4 years ago
parent
commit
fd0754ba43
  1. 4
      bot.js

4
bot.js

@ -802,7 +802,7 @@ client.on('messageReactionAdd', (messageReaction, user) => {
let numEmoji; let numEmoji;
let coolness; let coolness;
message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count; message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count;
if (numEmoji > 6) { if (numEmoji > 6 && numEmoji <= 9) {
coolness = '<:cool_finger_guns:828632824512512030> *Very* Kül Message' coolness = '<:cool_finger_guns:828632824512512030> *Very* Kül Message'
} else if (numEmoji > 9) { } else if (numEmoji > 9) {
coolness = '<a:pepe_cool_clap:828638408297414727> **SUPA** Kül Message' coolness = '<a:pepe_cool_clap:828638408297414727> **SUPA** Kül Message'
@ -889,7 +889,7 @@ client.on('messageReactionRemove', (messageReaction, user) => {
let numEmoji; let numEmoji;
let coolness; let coolness;
message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count; message.reactions.cache.get(emojiID) ? numEmoji = message.reactions.cache.get(emojiID).count : numEmoji = message.reactions.cache.get(emoji).count;
if (numEmoji > 6) { if (numEmoji > 6 && numEmoji <= 9) {
coolness = '<:cool_finger_guns:828632824512512030> *Very* Kül Message' coolness = '<:cool_finger_guns:828632824512512030> *Very* Kül Message'
} else if (numEmoji > 9) { } else if (numEmoji > 9) {
coolness = '<a:pepe_cool_clap:828638408297414727> **SUPA** Kül Message' coolness = '<a:pepe_cool_clap:828638408297414727> **SUPA** Kül Message'

Loading…
Cancel
Save