mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 06:45:31 +02:00
Fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user