Browse Source

Fix trying to get emotes with no emote types provided

ghorsington 5 năm trước cách đây
mục cha
commit
cc6bfedc7a
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)