Browse Source

Remove cache from ban function

master
Abheek Dhawan 4 years ago
parent
commit
a5d889c19f
  1. 2
      index.js

2
index.js

@ -146,7 +146,7 @@ async function ban(message) {
.then(userReaction => { .then(userReaction => {
const reaction = userReaction.first(); const reaction = userReaction.first();
if (reaction.emoji.name === '👍') { if (reaction.emoji.name === '👍') {
message.guild.members.cache.ban(member.user).then(user => message.reply(`<@${user.id}> has been banned!`)).catch(() => message.channel.send(`Unfortunately, I don't have the ability to ban ${member.user.username}, likely because their role is higher than mine.`)); message.guild.members.ban(member.user).then(user => message.reply(`<@${user.id}> has been banned!`)).catch(() => message.channel.send(`Unfortunately, I don't have the ability to ban ${member.user.username}, likely because their role is higher than mine.`));
} else { } else {
message.reply("phew! ${member}'s safe!"); message.reply("phew! ${member}'s safe!");
} }

Loading…
Cancel
Save