Update purge.js

ID Support, Boolean Changes
This commit is contained in:
DuAnti7423 committed 2021-05-23 10:40:10 +02:00
1 parent 14df15caeb
commit 2e1253c54e
1 file changed
+3 -3
+3 -3
View File
@@ -13,9 +13,9 @@ module.exports = {
description: supportbot.PurgeDesc,
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.Staff);
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PurgeMessage}!`);
@@ -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")