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