From 32dc8dadad870288fdae91652e6f289b9f19d74b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Jan 2021 15:39:42 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 8a9c9614..3c4d0da9 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -76,7 +76,7 @@ module.exports = class ChessCommand extends Command { const move = choice.match(turnRegex); if (!move) return false; const moves = game.moves(); - if (!moves[move[1]].includes(move[2])) { + if (!moves[move[1]] || !moves[move[1]].includes(move[2])) { reactIfAble(res, res.author, FAILURE_EMOJI_ID, '❌'); return false; }