forked from Galactic/galactic-bot
testing logs
This commit is contained in:
parent
2eec1a2ff5
commit
93861b1309
@ -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: [],
|
||||
|
@ -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)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user