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/config/disable.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/config/disable.ts')
-rw-r--r-- | src/commands/config/disable.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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] }); } |