diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-31 18:45:23 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-31 18:45:23 -0400 |
commit | a47ef150fd38fff3666faccd6f976f660fdbf9f3 (patch) | |
tree | 3f73c3d03236b09bf824469791f4ef7d2016b0b7 /src/commands/config/welcomeChannel.ts | |
parent | 9aa46f79516c0c044742339c59d471b43060d84f (diff) | |
download | tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.gz tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.bz2 tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.zip |
cleanup and deprecated old config commands
Diffstat (limited to 'src/commands/config/welcomeChannel.ts')
-rw-r--r-- | src/commands/config/welcomeChannel.ts | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/src/commands/config/welcomeChannel.ts b/src/commands/config/welcomeChannel.ts index fc56607..c94b416 100644 --- a/src/commands/config/welcomeChannel.ts +++ b/src/commands/config/welcomeChannel.ts @@ -1,5 +1,4 @@ import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { Channel } from 'discord.js'; export default class WelcomeChannelCommand extends BushCommand { public constructor() { @@ -7,46 +6,17 @@ export default class WelcomeChannelCommand extends BushCommand { aliases: ['welcomechannel', 'wc'], category: 'config', description: { - content: 'Configure the what channel you want BushBot to send a message in when someone joins the server.', + content: 'This command has been deprecated, please use the config command instead', usage: 'welcomechannel [channel]', examples: ['welcomechannel #welcome'] }, - args: [ - { - id: 'channel', - type: 'channel', - prompt: { - start: 'What channel would you like me to send welcome messages in?', - retry: '{error} Choose a valid channel', - optional: true - } - } - ], - slash: true, - slashOptions: [ - { - name: 'channel', - description: 'What channel would you like me to send welcome messages in?', - type: 'CHANNEL', - required: false - } - ], channel: 'guild', + hidden: true, clientPermissions: ['SEND_MESSAGES'], userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'] }); } - public override async exec(message: BushMessage | BushSlashMessage, args: { channel: Channel }): Promise<unknown> { - const oldChannel = await message.guild!.getSetting('welcomeChannel'); - await message.guild!.setSetting('welcomeChannel', args.channel.id ?? undefined); - if (args.channel) { - return await message.util.send( - `${util.emojis.success} changed the server's welcome channel ${oldChannel ? `from <#${oldChannel}>` : ''} to <#${ - args.channel.id - }>.` - ); - } else { - return await message.util.send(`${util.emojis.success} removed the server's welcome channel.`); - } + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + return message.util.reply(`${util.emojis.error} 'This command has been deprecated, please use the config command instead'`); } } |