aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/lockdown.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-18 18:44:53 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-18 18:44:53 -0400
commitc946774f10f64bdf39074310f5df82bfa59fc322 (patch)
tree63f90d08a38b310389afc2fc31f02621588016c8 /src/commands/moderation/lockdown.ts
parent8725cff3e370b54b7d372dda9e1991d81fc25b25 (diff)
downloadtanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.tar.gz
tanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.tar.bz2
tanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.zip
use new textBasedChannel arg type
Diffstat (limited to 'src/commands/moderation/lockdown.ts')
-rw-r--r--src/commands/moderation/lockdown.ts18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts
index 76d61d0..1224763 100644
--- a/src/commands/moderation/lockdown.ts
+++ b/src/commands/moderation/lockdown.ts
@@ -1,6 +1,5 @@
import {
AllowedMentions,
- Arg,
BushCommand,
clientSendAndPermCheck,
colors,
@@ -15,8 +14,8 @@ import {
import assert from 'assert';
import {
ApplicationCommandOptionType,
- ChannelType,
Collection,
+ Constants,
NewsChannel,
PermissionFlagsBits,
TextChannel,
@@ -36,17 +35,10 @@ export default class LockdownCommand extends BushCommand {
{
id: 'channel',
description: 'Specify a different channel to lockdown instead of the one you trigger the command in.',
- type: Arg.union('textChannel', 'newsChannel', 'threadChannel', 'voiceChannel'),
+ type: 'textBasedChannel',
prompt: 'What channel would you like to lockdown?',
slashType: ApplicationCommandOptionType.Channel,
- channelTypes: [
- ChannelType.GuildText,
- ChannelType.GuildNews,
- ChannelType.GuildNewsThread,
- ChannelType.GuildPublicThread,
- ChannelType.GuildPrivateThread,
- ChannelType.GuildVoice
- ],
+ channelTypes: Constants.TextBasedChannelTypes,
optional: true
},
{
@@ -79,7 +71,7 @@ export default class LockdownCommand extends BushCommand {
public override async exec(
message: CommandMessage | SlashMessage,
args: {
- channel: OptArgType<'textChannel' | 'newsChannel' | 'threadChannel' | 'voiceChannel'>;
+ channel: OptArgType<'textBasedChannel'>;
reason: OptArgType<'string'>;
all: ArgType<'flag'>;
}
@@ -90,7 +82,7 @@ export default class LockdownCommand extends BushCommand {
public static async lockdownOrUnlockdown(
message: CommandMessage | SlashMessage,
args: {
- channel: OptArgType<'textChannel' | 'newsChannel' | 'threadChannel' | 'voiceChannel'>;
+ channel: OptArgType<'textBasedChannel'>;
reason: OptArgType<'string'>;
all: ArgType<'flag'>;
},