This commit is contained in:
Dragon Fire
2021-01-24 11:20:03 -05:00
parent 11ab3ae45f
commit cb247ef9d5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
});
+2 -2
View File
@@ -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
});