diff --git a/commands/games-mp/cram.js b/commands/games-mp/cram.js index a157256d..748a29d4 100644 --- a/commands/games-mp/cram.js +++ b/commands/games-mp/cram.js @@ -79,7 +79,7 @@ module.exports = class CramCommand extends Command { ${this.displayBoard(board, userEmoji, oppoEmoji)} `); const possibleMoves = this.possibleMoves(board); - const filter = res => { + const colorFilter = res => { if (res.author.id !== user.id) return false; const pick = res.content; if (pick.toLowerCase() === 'end') return true; @@ -92,7 +92,7 @@ module.exports = class CramCommand extends Command { if (!possibleMoves.includes(`${direction}${x - 1},${y - 1}`)) return false; return true; }; - const turn = await msg.channel.awaitMessages(filter, { + const turn = await msg.channel.awaitMessages(colorFilter, { max: 1, time: 60000 }); diff --git a/commands/games-mp/domineering.js b/commands/games-mp/domineering.js index 88a1664b..4f11fba5 100644 --- a/commands/games-mp/domineering.js +++ b/commands/games-mp/domineering.js @@ -79,7 +79,7 @@ module.exports = class DomineeringCommand extends Command { ${this.displayBoard(board, userEmoji, oppoEmoji)} `); const possibleMoves = this.possibleMoves(board, userTurn); - const filter = res => { + const colorFilter = res => { if (res.author.id !== user.id) return false; const pick = res.content; if (pick.toLowerCase() === 'end') return true; @@ -91,7 +91,7 @@ module.exports = class DomineeringCommand extends Command { if (!possibleMoves.includes(`${x - 1},${y - 1}`)) return false; return true; }; - const turn = await msg.channel.awaitMessages(filter, { + const turn = await msg.channel.awaitMessages(colorFilter, { max: 1, time: 60000 });