Skip to content

Commit

Permalink
fix(lockdown): Require bot permissions
Browse files Browse the repository at this point in the history
Fixes BOT-294
  • Loading branch information
Marco Crespi committed Dec 10, 2019
1 parent e5fe390 commit 931395a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/moderation/commands/mod/lockdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IMClient } from '../../../client';
import { Command, Context } from '../../../framework/commands/Command';
import { ScheduledActionType } from '../../../framework/models/ScheduledAction';
import { ChannelResolver, DurationResolver } from '../../../framework/resolvers';
import { CommandGroup, ModerationCommand } from '../../../types';
import { CommandGroup, GuildPermission, ModerationCommand } from '../../../types';

const SEND_MESSAGES = 0x00000800;
const NOT_SEND_MESSAGES = 0x7ffff7ff;
Expand All @@ -31,6 +31,7 @@ export default class extends Command {
}
],
group: CommandGroup.Moderation,
botPermissions: [GuildPermission.MANAGE_ROLES, GuildPermission.MANAGE_CHANNELS],
defaultAdminOnly: true,
guildOnly: true
});
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum GuildPermission {
MANAGE_MESSAGES = 'manageMessages',
EMBED_LINKS = 'embedLinks',
MANAGE_GUILD = 'manageGuild',
MANAGE_CHANNELS = 'manageChannels',
VIEW_AUDIT_LOGS = 'viewAuditLogs',
MANAGE_ROLES = 'manageRoles',
CREATE_INSTANT_INVITE = 'createInstantInvite',
Expand Down

0 comments on commit 931395a

Please sign in to comment.