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/kick.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/kick.ts')
-rw-r--r-- | src/commands/moderation/kick.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index af486ac..4fd6c10 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -7,6 +7,7 @@ import { type BushMessage, type BushSlashMessage } from '#lib'; +import { ApplicationCommandOptionType, Permissions } from 'discord.js'; export default class KickCommand extends BushCommand { public constructor() { @@ -23,7 +24,7 @@ export default class KickCommand extends BushCommand { type: 'user', prompt: 'What user would you like to kick?', retry: '{error} Choose a valid user to kick.', - slashType: 'USER' + slashType: ApplicationCommandOptionType.User }, { id: 'reason', @@ -33,7 +34,7 @@ export default class KickCommand extends BushCommand { prompt: 'Why should this user be kicked?', retry: '{error} Choose a valid kick reason.', optional: true, - slashType: 'STRING' + slashType: ApplicationCommandOptionType.String }, { id: 'force', @@ -47,8 +48,8 @@ export default class KickCommand extends BushCommand { } ], slash: true, - clientPermissions: (m) => util.clientSendAndPermCheck(m, ['KICK_MEMBERS']), - userPermissions: ['KICK_MEMBERS'] + clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.KICK_MEMBERS]), + userPermissions: [Permissions.FLAGS.KICK_MEMBERS] }); } @@ -86,6 +87,8 @@ export default class KickCommand extends BushCommand { return `${util.emojis.warn} Kicked ${victim} however I could not send them a dm.`; case kickResponse.SUCCESS: return `${util.emojis.success} Successfully kicked ${victim}.`; + default: + return `${util.emojis.error} An error occurred: ${util.format.input(responseCode)}}`; } }; return await message.util.reply({ content: responseMessage(), allowedMentions: AllowedMentions.none() }); |