This commit is contained in:
Daniel Odendahl Jr
2017-10-03 18:48:54 +00:00
parent 7c59215662
commit 89d13ece2a
+4 -2
View File
@@ -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);