Bots can't reply

This commit is contained in:
Dragon Fire
2019-11-11 23:08:06 -05:00
parent 86a77ffcaf
commit b79fb4ffcc
+7 -5
View File
@@ -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]);