From d0b64dd501a2b1231c92d900608dd7199b41976d Mon Sep 17 00:00:00 2001 From: nolan Date: Sat, 26 Jun 2021 14:13:13 -0700 Subject: [PATCH] fix bug? --- structure/moderation/infractions/Addrole.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/structure/moderation/infractions/Addrole.js b/structure/moderation/infractions/Addrole.js index 821ea30..705db11 100644 --- a/structure/moderation/infractions/Addrole.js +++ b/structure/moderation/infractions/Addrole.js @@ -46,23 +46,17 @@ class AddroleInfraction extends Infraction { async verify() { - const missingAdministrator = this.channel.permissionsFor(this.guild.me).missing(['ADMINISTRATOR']); let filtered = []; const { highest: clientHighest } = this.guild.me.roles; filtered = this.data.roles.filter((r) => r.comparePositionTo(clientHighest) < 0); - console.log("Filtered roles (client)...", filtered.map((r) => r.name).join(', ')); if(filtered.length === 0) { return super._fail('C_ADDROLE_ROLEHIERARCHYBOT'); } - if(missingAdministrator.length > 0) { - const { highest: memberHighest } = this.executorMember.roles; - console.log(memberHighest.map((r) => r.name)); - filtered = this.data.roles.filter((r) => r.comparePositionTo(memberHighest) < 0); - console.log("Filtered roles (member)...", filtered.map((r) => r.name).join(', ')); - if(filtered.length === 0) { - return super._fail('C_ADDROLE_ROLEHIERARCHY'); - } + const { highest: memberHighest } = this.executorMember.roles; + filtered = this.data.roles.filter((r) => r.comparePositionTo(memberHighest) < 0); + if(filtered.length === 0) { + return super._fail('C_ADDROLE_ROLEHIERARCHY'); } this.data.roles = filtered;