From bd33669dba5c7f4504d37a8c767d6d9440df6f01 Mon Sep 17 00:00:00 2001 From: DuAnti7423 <82730507+DuAnti7423@users.noreply.github.com> Date: Sun, 23 May 2021 10:39:08 +0200 Subject: [PATCH] Update ban.js ID Support, Boolean Changes --- commands/ban.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/ban.js b/commands/ban.js index ced6931..a80fc7a 100644 --- a/commands/ban.js +++ b/commands/ban.js @@ -13,9 +13,9 @@ module.exports = { description: supportbot.BanDesc, execute(message, args, member) { - if (supportbot.DeleteMessages == "true") message.delete(); + if (supportbot.DeleteMessages) message.delete(); - let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin); + let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin) console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BanUser}!`); @@ -27,7 +27,7 @@ module.exports = { if (!message.member.roles.cache.has(SupportStaff.id)) return message.channel.send({ embed: NoPerms }); - let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel); + let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel) const errornochannel = new Discord.MessageEmbed() .setTitle("Invalid Channel")