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