mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Fix dots-and-boxes
This commit is contained in:
@@ -121,11 +121,11 @@ module.exports = class DotsAndBoxesCommand extends Command {
|
|||||||
}
|
}
|
||||||
if (lastTurnTimeout) lastTurnTimeout = false;
|
if (lastTurnTimeout) lastTurnTimeout = false;
|
||||||
}
|
}
|
||||||
|
this.client.games.delete(msg.channel.id);
|
||||||
if (winner === 'time') return msg.say('Game ended due to inactivity.');
|
if (winner === 'time') return msg.say('Game ended due to inactivity.');
|
||||||
winner = userOwned.length === oppoOwned.length
|
winner = userOwned.length === oppoOwned.length
|
||||||
? null
|
? null
|
||||||
: userOwned.length > oppoOwned.length ? msg.author : opponent;
|
: userOwned.length > oppoOwned.length ? msg.author : opponent;
|
||||||
this.client.games.delete(msg.channel.id);
|
|
||||||
return msg.say(winner ? `Congrats, ${winner}!` : 'Looks like it\'s a draw...');
|
return msg.say(winner ? `Congrats, ${winner}!` : 'Looks like it\'s a draw...');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user