From a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 23 Jan 2022 18:13:05 -0500 Subject: fix discord.js breaking changes, some other stuff --- src/commands/config/disable.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands/config/disable.ts') diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 564f90f..d59ff55 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -1,6 +1,6 @@ import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import assert from 'assert'; -import { AutocompleteInteraction } from 'discord.js'; +import { ApplicationCommandOptionType, AutocompleteInteraction, Permissions } from 'discord.js'; import Fuse from 'fuse.js'; assert(Fuse); @@ -20,7 +20,7 @@ export default class DisableCommand extends BushCommand { description: 'Whether to disable or enable the command.', readableType: "'disable'|'enable", prompt: 'Would you like to disable or enable a command?', - slashType: 'STRING', + slashType: ApplicationCommandOptionType.String, choices: ['disable', 'enable'].map((v) => ({ name: v, value: v })), only: 'slash' }, @@ -31,7 +31,7 @@ export default class DisableCommand extends BushCommand { readableType: 'command|commandAlias', prompt: 'What command would you like to enable/disable?', retry: '{error} Pick a valid command.', - slashType: 'STRING', + slashType: ApplicationCommandOptionType.String, autocomplete: true }, { @@ -48,7 +48,7 @@ export default class DisableCommand extends BushCommand { slash: true, channel: 'guild', clientPermissions: (m) => util.clientSendAndPermCheck(m), - userPermissions: ['MANAGE_GUILD'] + userPermissions: [Permissions.FLAGS.MANAGE_GUILD] }); } -- cgit