Parcourir la source

Fix trying to get emotes with no emote types provided

ghorsington il y a 5 ans
Parent
commit
cc6bfedc7a
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      bot/src/commands/react.ts

+ 3 - 0
bot/src/commands/react.ts

@@ -119,6 +119,9 @@ export class ReactCommands {
             reactionEmoteTypes.add(user.mentionReactionType);
         }
 
+        if(reactionEmoteTypes.size == 0)
+            return false;
+
         let randomEmotes = await getRandomEmotes([...reactionEmoteTypes], 5);
 
         if (randomEmotes.length == 0)