This commit is contained in:
Daniel Odendahl Jr
2017-10-03 20:17:54 +00:00
parent 2709679bb0
commit de189be69f
+7 -4
View File
@@ -37,7 +37,7 @@ module.exports = class QuizletGameCommand extends Command {
while (terms.length > 0) { while (terms.length > 0) {
const term = terms[0]; const term = terms[0];
await msg.say(stripIndents` await msg.say(stripIndents`
**You have 30 seconds to answer which word this is. (type "end game" to end the game)** **You have 30 seconds to answer which word this is.** _Type "end game" to end the game._
${term.definition} ${term.definition}
${term.image ? term.image.url : ''} ${term.image ? term.image.url : ''}
`); `);
@@ -57,10 +57,13 @@ module.exports = class QuizletGameCommand extends Command {
terms.push(term); terms.push(term);
} else { } else {
await msg.say('Nice job! 10/10! You deserve some cake!'); await msg.say('Nice job! 10/10! You deserve some cake!');
if (seen.has(term.term)) seen.delete(term.term); if (seen.has(term.term)) {
else terms.push(term); seen.delete(term.term);
} else {
seen.add(term.term);
terms.push(term);
}
} }
if (!seen.has(term.term)) seen.add(term.term);
terms.shift(); terms.shift();
} }
this.playing.delete(msg.channel.id); this.playing.delete(msg.channel.id);