diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
commit | a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch) | |
tree | 9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/commands/moderation/unlockdown.ts | |
parent | 5557677f1570eb564a30cfcebb6030235dc84d47 (diff) | |
download | tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2 tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip |
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/commands/moderation/unlockdown.ts')
-rw-r--r-- | src/commands/moderation/unlockdown.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/commands/moderation/unlockdown.ts b/src/commands/moderation/unlockdown.ts index 3d363ac..d7ba5ee 100644 --- a/src/commands/moderation/unlockdown.ts +++ b/src/commands/moderation/unlockdown.ts @@ -1,5 +1,6 @@ import { LockdownCommand } from '#commands'; import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib'; +import { ApplicationCommandOptionType, Permissions } from 'discord.js'; export default class UnlockdownCommand extends BushCommand { public constructor() { @@ -15,8 +16,8 @@ export default class UnlockdownCommand extends BushCommand { description: 'Specify a different channel to unlockdown instead of the one you trigger the command in.', type: util.arg.union('textChannel', 'newsChannel', 'threadChannel'), prompt: 'What channel would you like to unlockdown?', - slashType: 'CHANNEL', - channelTypes: ['GUILD_TEXT', 'GUILD_NEWS', 'GUILD_NEWS_THREAD', 'GUILD_PUBLIC_THREAD', 'GUILD_PRIVATE_THREAD'], + slashType: ApplicationCommandOptionType.Channel, + channelTypes: ['GuildText', 'GuildNews', 'GuildNewsThread', 'GuildPublicThread', 'GuildPrivateThread'], optional: true }, { @@ -25,7 +26,7 @@ export default class UnlockdownCommand extends BushCommand { type: 'string', match: 'rest', prompt: 'What is the reason for the unlock?', - slashType: 'STRING', + slashType: ApplicationCommandOptionType.String, optional: true }, { @@ -34,14 +35,14 @@ export default class UnlockdownCommand extends BushCommand { match: 'flag', flag: '--all', prompt: 'Would you like to unlockdown all configured channels?', - slashType: 'BOOLEAN', + slashType: ApplicationCommandOptionType.Boolean, optional: true } ], slash: true, channel: 'guild', - clientPermissions: (m) => util.clientSendAndPermCheck(m, ['MANAGE_CHANNELS']), - userPermissions: ['MANAGE_CHANNELS'] + clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]), + userPermissions: [Permissions.FLAGS.MANAGE_CHANNELS] }); } |