diff --git a/commands/games-mp/typing-race.js b/commands/games-mp/typing-race.js index c18d243a..1b0678ba 100644 --- a/commands/games-mp/typing-race.js +++ b/commands/games-mp/typing-race.js @@ -39,7 +39,10 @@ module.exports = class TypingRaceCommand extends Command { files: [{ attachment: img, name: 'typing-race.png' }] }); const now = Date.now(); - const filter = res => [opponent.id, msg.author.id].includes(res.author.id) && res.content === sentence; + const filter = res => { + if (![opponent.id, msg.author.id].includes(res.author.id)) return false; + return res.content.toLowerCase() === sentence; + }; const winner = await msg.channel.awaitMessages(filter, { max: 1, time: 30000 diff --git a/commands/games-sp/typing-test.js b/commands/games-sp/typing-test.js index 8d111961..eb4bbe25 100644 --- a/commands/games-sp/typing-test.js +++ b/commands/games-sp/typing-test.js @@ -46,7 +46,7 @@ module.exports = class TypingTestCommand extends Command { max: 1, time }); - const win = msgs.size && msgs.first().content === sentence; + const win = msgs.size && msgs.first().content.toLowerCase() === sentence; const newScore = Date.now() - now; const highScoreGet = await this.client.redis.get('typing-test'); const highScore = highScoreGet ? Number.parseInt(highScoreGet, 10) : null; @@ -58,7 +58,7 @@ module.exports = class TypingTestCommand extends Command { await this.client.redis.set('typing-test-user', msg.author.id); } if (!msgs.size) return msg.reply('Sorry! You lose!'); - if (msgs.first().content !== sentence) return msg.reply('Sorry! You made a typo, so you lose!'); + if (msgs.first().content.toLowerCase() !== sentence) return msg.reply('Sorry! You made a typo, so you lose!'); return msg.reply(stripIndents` Nice job! 10/10! You deserve some cake! (Took ${newScore / 1000} seconds) ${scoreBeat ? `**New High Score!** Old:` : `High Score:`} ${highScore / 1000} (Held by ${user})