This commit is contained in:
Dragon Fire
2021-01-23 15:39:42 -05:00
parent 99be26f72c
commit 32dc8dadad
+1 -1
View File
@@ -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;
}