Fix Games Commands

This commit is contained in:
Daniel Odendahl Jr
2017-03-31 14:25:06 +00:00
parent b0b90d71ae
commit 84f30b906f
3 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -61,8 +61,7 @@ module.exports = class MathGameCommand extends commando.Command {
time: 10000,
errors: ['time']
});
if (collected.first() !== solved.toString()) {
console.log(collected.first());
if (collected.first().content !== solved.toString()) {
let loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
return [embedMsg, loseMsg];
}
+1 -2
View File
@@ -38,8 +38,7 @@ module.exports = class QuizCommand extends commando.Command {
time: 15000,
errors: ['time']
});
if (collected.first().toLowerCase() !== answer) {
console.log(collected.first());
if (collected.first().content.toLowerCase() !== answer) {
let loseMsg = await message.say(`The correct answer is: ${answer}`);
return [embedMsg, loseMsg];
}
+1 -1
View File
@@ -61,7 +61,7 @@ module.exports = class TypingGameCommand extends commando.Command {
time: time,
errors: ['time']
});
if (collected.first() !== randomSentence) {
if (collected.first().content !== randomSentence) {
console.log(collected.first());
let loseMsg = await message.say('Nope, your sentence does not match the original. Try again next time!');
return [embedMsg, loseMsg];