From 89d13ece2af8495aca6265e55a8913294dc3efc1 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 3 Oct 2017 18:48:54 +0000 Subject: [PATCH] Beep --- commands/games/quizlet-game.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/games/quizlet-game.js b/commands/games/quizlet-game.js index 86cc9125..f9b7ee69 100644 --- a/commands/games/quizlet-game.js +++ b/commands/games/quizlet-game.js @@ -44,8 +44,10 @@ module.exports = class QuizletGameCommand extends Command { max: 1, time: 30000 }); - if (!msgs.size || msgs.first().content.toLowerCase() !== term.term.toLowerCase()) { - if (msgs.first().content.toLowerCase() === 'end game') break; + if (!msgs.size) break; + const choice = msgs.first().content.toLowerCase(); + if (choice === 'end game') break; + if (choice !== term.term.toLowerCase()) { await msg.say(`Nope, sorry, it was ${term.term}.`); if (seen.has(term.term)) seen.delete(term.term); terms.push(term);