diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-18 18:44:53 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-18 18:44:53 -0400 |
commit | c946774f10f64bdf39074310f5df82bfa59fc322 (patch) | |
tree | 63f90d08a38b310389afc2fc31f02621588016c8 /src/commands/utilities | |
parent | 8725cff3e370b54b7d372dda9e1991d81fc25b25 (diff) | |
download | tanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.tar.gz tanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.tar.bz2 tanzanite-c946774f10f64bdf39074310f5df82bfa59fc322.zip |
use new textBasedChannel arg type
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/viewRaw.ts | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/commands/utilities/viewRaw.ts b/src/commands/utilities/viewRaw.ts index 057d86d..d2aef0d 100644 --- a/src/commands/utilities/viewRaw.ts +++ b/src/commands/utilities/viewRaw.ts @@ -11,7 +11,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert'; -import { ApplicationCommandOptionType, ChannelType, EmbedBuilder, Message, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType, Constants, EmbedBuilder, Message, PermissionFlagsBits } from 'discord.js'; export default class ViewRawCommand extends BushCommand { public constructor() { @@ -34,20 +34,12 @@ export default class ViewRawCommand extends BushCommand { { id: 'channel', description: 'The channel that the message is in.', - type: Arg.union('textChannel', 'newsChannel', 'threadChannel', 'voiceChannel'), + type: 'textBasedChannel', prompt: 'What channel is the message in?', retry: '{error} Choose a valid channel.', optional: true, slashType: ApplicationCommandOptionType.Channel, - channelTypes: [ - ChannelType.GuildText, - ChannelType.DM, - ChannelType.GuildNews, - ChannelType.GuildNewsThread, - ChannelType.GuildPublicThread, - ChannelType.GuildPrivateThread, - ChannelType.GuildVoice - ] + channelTypes: Constants.TextBasedChannelTypes }, { id: 'json', @@ -79,7 +71,7 @@ export default class ViewRawCommand extends BushCommand { message: CommandMessage | SlashMessage, args: { message: ArgType<'message' | 'messageLink'>; - channel: OptArgType<'textChannel' | 'newsChannel' | 'threadChannel' | 'voiceChannel'>; + channel: OptArgType<'textBasedChannel'>; json: ArgType<'flag'>; js: ArgType<'flag'>; } |