From 54047b3a1a7fe3cc08808475d152936069697e4d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Mar 2024 23:45:39 -0400 Subject: [PATCH] Fix --- commands/games-mp/tic-tac-toe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-mp/tic-tac-toe.js b/commands/games-mp/tic-tac-toe.js index 7da31e34..fd77ae04 100644 --- a/commands/games-mp/tic-tac-toe.js +++ b/commands/games-mp/tic-tac-toe.js @@ -3,6 +3,7 @@ const { default: { ComputerMove } } = require('tictactoe-minimax-ai'); const { stripIndents } = require('common-tags'); const { verify } = require('../../util/Util'); const nums = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣']; +const valid = ['1', '2', '3', '4', '5', '6', '7', '8', '9']; module.exports = class TicTacToeCommand extends Command { constructor(client) { @@ -59,7 +60,7 @@ module.exports = class TicTacToeCommand extends Command { if (res.author.id !== user.id) return false; const pick = res.content; if (pick.toLowerCase() === 'end') return true; - return sides.includes(pick) && !taken.includes(pick); + return valid.includes(pick) && !taken.includes(pick); }; const turn = await msg.channel.awaitMessages({ filter,