diff --git a/src/structure/components/commands/moderation/Slowmode.js b/src/structure/components/commands/moderation/Slowmode.js index 4e6d13c..1cf9d36 100644 --- a/src/structure/components/commands/moderation/Slowmode.js +++ b/src/structure/components/commands/moderation/Slowmode.js @@ -21,7 +21,8 @@ class SlowmodeCommand extends ModerationCommand { name: 'limit', description: 'How long between messages', type: 'TIME', - required: true + required: true, + maximum: 21600 } ], skipOptions: [ 'users', 'force', 'expiration', 'points', 'silent' ] @@ -31,8 +32,6 @@ class SlowmodeCommand extends ModerationCommand { async execute(invoker, { channels, limit, silent, ...args }) { - //if (!channels) throw new CommandError(interaction, { index: 'MODERATION_MISSING_CHANNELS' }); - return this.client.moderationManager.handleInfraction(Slowmode, invoker, { targets: channels?.value || [invoker.channel], args: { diff --git a/src/structure/infractions/Mute.js b/src/structure/infractions/Mute.js index df187e7..b93abfe 100644 --- a/src/structure/infractions/Mute.js +++ b/src/structure/infractions/Mute.js @@ -141,8 +141,8 @@ class MuteInfraction extends Infraction { } const me = await this.guild.resolveMember(this.client.user); if (settings.mute.type === 3) { - 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.permissions.missing(['ModerateMembers']).length) return this._fail('COMMAND_MUTE_MISSING_MODERATE_PERM', true); + if (!this.member.moderatable) return this._fail('MODERATION_OWNER'); // 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');