mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
No fighting urself
This commit is contained in:
@@ -23,6 +23,7 @@ module.exports = class TicTacToeCommand extends Command {
|
||||
|
||||
async run(msg, args) { // eslint-disable-line complexity
|
||||
const opponent = args.opponent || this.client.user;
|
||||
if (opponent.id === msg.author.id) return msg.say('You may not play against yourself.');
|
||||
if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.');
|
||||
this.playing.add(msg.channel.id);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user