From a0807244a05d91390af1004c6e23d01d15a16139 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 14 Dec 2017 15:39:15 +0000 Subject: [PATCH] Fix --- commands/games/google-feud.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games/google-feud.js b/commands/games/google-feud.js index 46036e83..eca97b9c 100644 --- a/commands/games/google-feud.js +++ b/commands/games/google-feud.js @@ -23,7 +23,7 @@ module.exports = class GoogleFeudCommand extends Command { const suggestions = await this.fetchSuggestions(question); const display = new Array(suggestions.length).fill('???'); let fails = 0; - while (suggestions.length !== display.length && fails < 3) { + while (display.includes('???') && fails < 3) { const embed = new MessageEmbed() .setColor(0x005AF0) .setTitle(`${question}...?`) @@ -49,6 +49,7 @@ module.exports = class GoogleFeudCommand extends Command { await msg.say(`Nope! ${3 - fails} tries remaining!`); } } + this.playing.delete(msg.channel.id); if (fails > 3) return msg.say('Better luck next time!'); return msg.say('You win! Nice job, master of Google!'); } catch (err) {