Просмотр исходного кода

Fix trying to get emotes with no emote types provided

ghorsington 5 лет назад
Родитель
Сommit
cc6bfedc7a
1 измененных файлов с 3 добавлено и 0 удалено
  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)