From a5d889c19fe032ebc6a544d71b942d31527ca86e Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 20:42:52 -0500 Subject: [PATCH] Remove cache from ban function --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9e4faab..55d25ac 100644 --- a/index.js +++ b/index.js @@ -146,7 +146,7 @@ async function ban(message) { .then(userReaction => { const reaction = userReaction.first(); 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 { message.reply("phew! ${member}'s safe!"); }