From 93861b1309015099c599f85aa87a43c2f99a09aa Mon Sep 17 00:00:00 2001 From: nolan Date: Sat, 26 Jun 2021 14:08:04 -0700 Subject: [PATCH] testing logs --- .../components/commands/moderation/Removerole.js | 2 +- .../client/components/settings/developer/CamelCase.js | 2 +- structure/moderation/infractions/Addrole.js | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/structure/client/components/commands/moderation/Removerole.js b/structure/client/components/commands/moderation/Removerole.js index 712248e..6bddca6 100644 --- a/structure/client/components/commands/moderation/Removerole.js +++ b/structure/client/components/commands/moderation/Removerole.js @@ -13,7 +13,7 @@ class RemoveroleCommand extends Command { 'removeroles', 'rolesremove' ], - usage: " [reason]", + usage: " [duration] [reason]", clientPermissions: ['MANAGE_ROLES'], memberPermissions: ['MANAGE_ROLES'], examples: [], diff --git a/structure/client/components/settings/developer/CamelCase.js b/structure/client/components/settings/developer/CamelCase.js index 87d5d16..75dd994 100644 --- a/structure/client/components/settings/developer/CamelCase.js +++ b/structure/client/components/settings/developer/CamelCase.js @@ -36,7 +36,7 @@ class CamelCaseSetting extends Setting { fields(user) { return { name: "》 Status", - value: user.format('SETTING_STATUS', { bool: Boolean(user._settings.camelcase) }, true) + value: user.format('SETTING_STATUS', { bool: Boolean(user._settings.camelCase) }, true) }; } diff --git a/structure/moderation/infractions/Addrole.js b/structure/moderation/infractions/Addrole.js index b8be4cf..821ea30 100644 --- a/structure/moderation/infractions/Addrole.js +++ b/structure/moderation/infractions/Addrole.js @@ -48,15 +48,18 @@ class AddroleInfraction extends Infraction { const missingAdministrator = this.channel.permissionsFor(this.guild.me).missing(['ADMINISTRATOR']); let filtered = []; - const { highest } = this.guild.me.roles; - filtered = this.data.roles.filter((r) => r.comparePositionTo(highest) < 0); + 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 } = this.executorMember.roles; - filtered = this.data.roles.filter((r) => r.comparePositionTo(highest) < 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'); }