mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 15:57:54 +02:00
Bots can't reply
This commit is contained in:
@@ -26,11 +26,13 @@ module.exports = class RussianRouletteCommand extends Command {
|
|||||||
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 });
|
||||||
try {
|
try {
|
||||||
await msg.say(`${opponent}, do you accept this challenge?`);
|
if (!opponent.bot) {
|
||||||
const verification = await verify(msg.channel, opponent);
|
await msg.say(`${opponent}, do you accept this challenge?`);
|
||||||
if (!verification) {
|
const verification = await verify(msg.channel, opponent);
|
||||||
this.client.games.delete(msg.channel.id);
|
if (!verification) {
|
||||||
return msg.say('Looks like they declined...');
|
this.client.games.delete(msg.channel.id);
|
||||||
|
return msg.say('Looks like they declined...');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let userTurn = true;
|
let userTurn = true;
|
||||||
const gun = shuffle([true, false, false, false, false, false, false, false]);
|
const gun = shuffle([true, false, false, false, false, false, false, false]);
|
||||||
|
|||||||
Reference in New Issue
Block a user