Why does this even work

This commit is contained in:
Daniel Odendahl Jr
2018-06-10 01:26:20 +00:00
parent c8d78901c7
commit 2dd81a23ea
9 changed files with 22 additions and 19 deletions
+2 -7
View File
@@ -48,13 +48,8 @@ module.exports = class GoogleFeudCommand extends Command {
break;
}
const choice = msgs.first().content.toLowerCase();
if (suggestions.includes(choice)) {
await msg.say('Nice job!');
display[suggestions.indexOf(choice)] = choice;
} else {
--tries;
if (tries) await msg.say(`Nope! ${tries} tries remaining!`);
}
if (suggestions.includes(choice)) display[suggestions.indexOf(choice)] = choice;
else --tries;
}
this.playing.delete(msg.channel.id);
if (!display.includes('???')) return msg.say('You win! Nice job, master of Google!');