testing logs

This commit is contained in:
nolan 2021-06-26 14:08:04 -07:00
parent 2eec1a2ff5
commit 93861b1309
3 changed files with 9 additions and 6 deletions

View File

@ -13,7 +13,7 @@ class RemoveroleCommand extends Command {
'removeroles',
'rolesremove'
],
usage: "<member..> <role..> [reason]",
usage: "<member..> <role..> [duration] [reason]",
clientPermissions: ['MANAGE_ROLES'],
memberPermissions: ['MANAGE_ROLES'],
examples: [],

View File

@ -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)
};
}

View File

@ -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');
}