mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
Fix
This commit is contained in:
@@ -52,12 +52,12 @@ module.exports = class ConnectFourCommand extends Command {
|
|||||||
const current = this.client.games.get(msg.channel.id);
|
const current = this.client.games.get(msg.channel.id);
|
||||||
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
||||||
this.client.games.set(msg.channel.id, { name: this.name });
|
this.client.games.set(msg.channel.id, { name: this.name });
|
||||||
const playerOneEmoji = colors[color];
|
const playerOneEmoji = color;
|
||||||
let playerTwoEmoji = color === 'yellow' ? colors.red : colors.yellow;
|
let playerTwoEmoji = color === colors.yellow ? colors.red : colors.yellow;
|
||||||
try {
|
try {
|
||||||
const available = Object.keys(colors).filter(clr => {
|
const available = Object.keys(colors).filter(clr => {
|
||||||
if (color === 'blue' && clr === 'purple') return false;
|
if (color === colors.blue && clr === colors.purple) return false;
|
||||||
if (color === 'purple' && clr === 'blue') return false;
|
if (color === colors.purple && clr === colors.blue) return false;
|
||||||
return color !== clr;
|
return color !== clr;
|
||||||
});
|
});
|
||||||
if (opponent.bot) {
|
if (opponent.bot) {
|
||||||
|
|||||||
Reference in New Issue
Block a user