mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +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;
|
||||
}
|
||||
this.client.games.delete(msg.channel.id);
|
||||
if (winner === 'time') return msg.say('Game ended due to inactivity.');
|
||||
winner = userOwned.length === oppoOwned.length
|
||||
? null
|
||||
: 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...');
|
||||
} catch (err) {
|
||||
this.client.games.delete(msg.channel.id);
|
||||
|
||||
Reference in New Issue
Block a user