forked from Galactic/galactic-bot
fixes
This commit is contained in:
parent
b0a719d229
commit
073177be31
@ -21,7 +21,8 @@ class SlowmodeCommand extends ModerationCommand {
|
|||||||
name: 'limit',
|
name: 'limit',
|
||||||
description: 'How long between messages',
|
description: 'How long between messages',
|
||||||
type: 'TIME',
|
type: 'TIME',
|
||||||
required: true
|
required: true,
|
||||||
|
maximum: 21600
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
skipOptions: [ 'users', 'force', 'expiration', 'points', 'silent' ]
|
skipOptions: [ 'users', 'force', 'expiration', 'points', 'silent' ]
|
||||||
@ -31,8 +32,6 @@ class SlowmodeCommand extends ModerationCommand {
|
|||||||
|
|
||||||
async execute(invoker, { channels, limit, silent, ...args }) {
|
async execute(invoker, { channels, limit, silent, ...args }) {
|
||||||
|
|
||||||
//if (!channels) throw new CommandError(interaction, { index: 'MODERATION_MISSING_CHANNELS' });
|
|
||||||
|
|
||||||
return this.client.moderationManager.handleInfraction(Slowmode, invoker, {
|
return this.client.moderationManager.handleInfraction(Slowmode, invoker, {
|
||||||
targets: channels?.value || [invoker.channel],
|
targets: channels?.value || [invoker.channel],
|
||||||
args: {
|
args: {
|
||||||
|
@ -141,8 +141,8 @@ class MuteInfraction extends Infraction {
|
|||||||
}
|
}
|
||||||
const me = await this.guild.resolveMember(this.client.user);
|
const me = await this.guild.resolveMember(this.client.user);
|
||||||
if (settings.mute.type === 3) {
|
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 (me.roles.highest.position <= this.member.roles.highest.position) return this._fail('COMMAND_MUTE_HIERARCHY_ERROR');
|
||||||
// if (!this.duration && !settings.mute.default)
|
// if (!this.duration && !settings.mute.default)
|
||||||
} else if (me.permissions.missing('ManageRoles').length) return this._fail('COMMAND_MUTE_MISSING_MANAGEROLE_PERM');
|
} else if (me.permissions.missing('ManageRoles').length) return this._fail('COMMAND_MUTE_MISSING_MANAGEROLE_PERM');
|
||||||
|
Loading…
Reference in New Issue
Block a user