From 2481a70e323675c23f8af6d55967105abc9b1fc0 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 25 Mar 2017 05:56:48 +0000 Subject: [PATCH] toLowerCase test --- commands/games/mathgame.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 524e5e3d..2e09229a 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -12,19 +12,19 @@ module.exports = class MathGameCommand extends commando.Command { examples: [';mathgame easy', ';mathgame medium', ';mathgame hard', ';mathgame extreme'], args: [{ key: 'difficulty', - prompt: 'What difficulty should the math game be? Easy, Medium, Hard, or Extreme?', + prompt: 'What difficulty should the math game be? easy, medium, hard, or extreme?', type: 'string', validate: difficulty => { - if (difficulty === 'easy') { + if (difficulty.toLowerCase() === 'easy') { return true; } - else if (difficulty === 'medium') { + else if (difficulty.toLowerCase() === 'medium') { return true; } - else if (difficulty === 'hard') { + else if (difficulty.toLowerCase() === 'hard') { return true; } - else if (difficulty === 'extreme') { + else if (difficulty.toLowerCase() === 'extreme') { return true; } return 'Please set the difficulty to either `easy`, `medium`, `hard`, or `extreme`.';