consolidate check

This commit is contained in:
Erik 2022-08-17 12:57:31 +03:00
parent 18f61d07f6
commit 19dd164447
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,6 @@
[MODERATION_OWNER]
unable to moderate the user
[MODERATION_MISSING_USERS]
You must provide target users.
@ -87,7 +90,7 @@ I had issues assigning roles to them
I had issues revoking roles from them
[COMMAND_MUTE_4FAIL]
Failed to time out member.
request rejected (likely permission issue)
//Kick Command
[COMMAND_KICK_HELP]

View File

@ -140,8 +140,9 @@ class MuteInfraction extends Infraction {
}
const me = await this.guild.resolveMember(this.client.user);
if (settings.mute.type === 3) {
if (me.permissions.missing('ModerateMembers').length) return this._fail('COMMAND_MUTE_MISSING_MODERATE_PERM', true);
if (me.roles.highest.position <= this.member.roles.highest.position) return this._fail('COMMAND_MUTE_HIERARCHY_ERROR');
if (!this.target.moderatable) return this._fail('MODERATION_OWNER');
// if (me.permissions.missing('ModerateMembers').length) return this._fail('COMMAND_MUTE_MISSING_MODERATE_PERM', true);
// if (me.roles.highest.position <= this.member.roles.highest.position) return this._fail('COMMAND_MUTE_HIERARCHY_ERROR');
// if (!this.duration && !settings.mute.default)
} else if (me.permissions.missing('ManageRoles').length) return this._fail('COMMAND_MUTE_MISSING_MANAGEROLE_PERM');