From f5c2b7b946487c2828365cc63bc6f471dd6cfc2f Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 30 Jul 2021 13:04:24 -0400 Subject: clean up and fix stuff --- src/commands/moderation/_lockdown.ts | 47 ++++++++++++++++++++++++++++++++++++ src/commands/moderation/lockdown.ts | 47 ------------------------------------ 2 files changed, 47 insertions(+), 47 deletions(-) create mode 100644 src/commands/moderation/_lockdown.ts delete mode 100644 src/commands/moderation/lockdown.ts (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/_lockdown.ts b/src/commands/moderation/_lockdown.ts new file mode 100644 index 0000000..db074b1 --- /dev/null +++ b/src/commands/moderation/_lockdown.ts @@ -0,0 +1,47 @@ +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 { + return await message.util.reply('no'); + if (!all) { + if (!['GUILD_TEXT', 'GUILD_NEWS'].includes(message.channel.type)) + return message.util.reply(`${util.emojis.error} You can only lock down text and announcement channels.`); + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const lockdownSuccess = await util.lockdownChannel({ + channel: message.channel as BushTextChannel | BushNewsChannel, + moderator: message.author + }); + } + } +} diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts deleted file mode 100644 index db074b1..0000000 --- a/src/commands/moderation/lockdown.ts +++ /dev/null @@ -1,47 +0,0 @@ -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 { - return await message.util.reply('no'); - if (!all) { - if (!['GUILD_TEXT', 'GUILD_NEWS'].includes(message.channel.type)) - return message.util.reply(`${util.emojis.error} You can only lock down text and announcement channels.`); - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const lockdownSuccess = await util.lockdownChannel({ - channel: message.channel as BushTextChannel | BushNewsChannel, - moderator: message.author - }); - } - } -} -- cgit