From 873123996889c824c7d52785b7cf2903372b71a5 Mon Sep 17 00:00:00 2001 From: TymanWasTaken Date: Sat, 19 Jun 2021 11:31:36 -0600 Subject: fix: Use latest features of akairo fork --- src/commands/moderation/ban.ts | 12 ++++++------ src/commands/moderation/kick.ts | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index f843ac4..e67bd6a 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { CommandInteraction, Message, User } from 'discord.js'; import moment from 'moment'; import { BushCommand } from '../../lib/extensions/BushCommand'; @@ -46,26 +45,27 @@ export default class BanCommand extends BushCommand { usage: 'ban [--time]', examples: ['ban @Tyman being cool', 'ban @Tyman being cool --time 7days'] }, - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to ban', required: true }, { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'reason', description: 'The reason to show in modlogs and audit log', required: false }, { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'time', description: 'The time the user should be banned for (default permanent)', required: false } - ] + ], + slash: true }); } async *genResponses( diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index eed0122..3e2e8d1 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { CommandInteraction, GuildMember, Message } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -29,20 +28,21 @@ export default class KickCommand extends BushCommand { usage: 'kick ', examples: ['kick @Tyman being cool'] }, - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to kick', required: true }, { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'reason', description: 'The reason to show in modlogs and audit log', required: false } - ] + ], + slash: true }); } -- cgit