mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Fix Games Commands
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user