Sfoglia il codice sorgente

Fix trying to get emotes with no emote types provided

ghorsington 5 anni fa
parent
commit
cc6bfedc7a
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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)