From ac39f3f7b1c285ef9c7fcaf33bb03a8b969ac568 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 24 Aug 2017 20:43:37 +0000 Subject: [PATCH] Fix --- commands/games/math-game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/games/math-game.js b/commands/games/math-game.js index 645a7586..45e82ac0 100644 --- a/commands/games/math-game.js +++ b/commands/games/math-game.js @@ -28,7 +28,7 @@ module.exports = class MathGameCommand extends Command { async run(msg, args) { const { difficulty } = args; - const operation = operations[difficulty][Math.floor(Math.random() * operations.length)]; + const operation = operations[difficulty][Math.floor(Math.random() * operations[difficulty].length)]; const value1 = Math.floor(Math.random() * maxValues[difficulty]) + 1; const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1; const expression = `${value1} ${operation} ${value2}`;