mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Bug Fixes
This commit is contained in:
@@ -59,9 +59,10 @@ module.exports = class MathGameCommand extends commando.Command {
|
|||||||
let collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, {
|
let collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 10000,
|
time: 10000,
|
||||||
errors: ['time'],
|
errors: ['time']
|
||||||
});
|
});
|
||||||
if (collected.first() !== solved.toString()) {
|
if (collected.first() !== solved.toString()) {
|
||||||
|
console.log(collected.first());
|
||||||
let loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
let loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||||
return [embedMsg, loseMsg];
|
return [embedMsg, loseMsg];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ module.exports = class QuizCommand extends commando.Command {
|
|||||||
errors: ['time']
|
errors: ['time']
|
||||||
});
|
});
|
||||||
if (collected.first().toLowerCase() !== answer) {
|
if (collected.first().toLowerCase() !== answer) {
|
||||||
|
console.log(collected.first());
|
||||||
let loseMsg = await message.say(`The correct answer is: ${answer}`);
|
let loseMsg = await message.say(`The correct answer is: ${answer}`);
|
||||||
return [embedMsg, loseMsg];
|
return [embedMsg, loseMsg];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ module.exports = class TypingGameCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let level = args.difficulty.toLowerCase();
|
let level = args.difficulty.toLowerCase();
|
||||||
if (level !== 'easy' || level !== 'medium' || level !== 'hard' || level !== 'extreme') return message.say(':x: Error! Please set the difficulty to either easy, medium, hard, or extreme!');
|
|
||||||
let randomSentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.'];
|
let randomSentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.'];
|
||||||
randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)];
|
randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)];
|
||||||
let time;
|
let time;
|
||||||
@@ -63,6 +62,7 @@ module.exports = class TypingGameCommand extends commando.Command {
|
|||||||
errors: ['time']
|
errors: ['time']
|
||||||
});
|
});
|
||||||
if (collected.first() !== randomSentence) {
|
if (collected.first() !== randomSentence) {
|
||||||
|
console.log(collected.first());
|
||||||
let loseMsg = await message.say('Nope, your sentence does not match the original. Try again next time!');
|
let loseMsg = await message.say('Nope, your sentence does not match the original. Try again next time!');
|
||||||
return [embedMsg, loseMsg];
|
return [embedMsg, loseMsg];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user