aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/lockdown.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moderation/lockdown.ts')
-rw-r--r--src/commands/moderation/lockdown.ts45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts
new file mode 100644
index 0000000..e67d110
--- /dev/null
+++ b/src/commands/moderation/lockdown.ts
@@ -0,0 +1,45 @@
+import { BushCommand, BushMessage, BushNewsChannel, BushSlashMessage, BushTextChannel } from '@lib';
+
+export default class LockdownCommand extends BushCommand {
+ public constructor() {
+ super('lockdown', {
+ aliases: ['lockdown', 'unlockdown'],
+ category: 'moderation',
+ description: {
+ content: 'Allows you to lockdown a channel or all configured channels..',
+ usage: 'lockdown [--all]',
+ examples: ['lockdown', 'lockdown --all']
+ },
+ args: [
+ {
+ id: 'all',
+ type: 'flag',
+ flag: '--all'
+ }
+ ],
+ slash: true,
+ slashOptions: [
+ {
+ name: 'all',
+ description: 'Would you like to lockdown all channels?',
+ type: 'BOOLEAN',
+ required: false
+ }
+ ],
+ channel: 'guild',
+ clientPermissions: ['SEND_MESSAGES'],
+ userPermissions: ['SEND_MESSAGES']
+ });
+ }
+ public async exec(message: BushMessage | BushSlashMessage, { all }: { all: boolean }): Promise<unknown> {
+ return await message.util.reply('no');
+ if (!all) {
+ if (!['GUILD_TEXT', 'GUILD_NEWS'].includes(message.channel.type))
+ return message.util.reply(`${this.client.util.emojis.error} You can only lock down text and announcement channels.`);
+ const lockdownSuccess = await this.client.util.lockdownChannel({
+ channel: message.channel as BushTextChannel | BushNewsChannel,
+ moderator: message.author
+ });
+ }
+ }
+}