diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/dev/reload.ts | 8 | ||||
-rw-r--r-- | src/commands/dev/setLevel.ts | 10 | ||||
-rw-r--r-- | src/commands/info/botInfo.ts | 3 | ||||
-rw-r--r-- | src/commands/info/help.ts | 8 | ||||
-rw-r--r-- | src/commands/info/ping.ts | 3 | ||||
-rw-r--r-- | src/commands/info/pronouns.ts | 8 | ||||
-rw-r--r-- | src/commands/moderation/ban.ts | 12 | ||||
-rw-r--r-- | src/commands/moderation/kick.ts | 10 | ||||
-rw-r--r-- | src/commands/moulberry-bush/capePerms.ts | 8 | ||||
-rw-r--r-- | src/commands/moulberry-bush/level.ts | 8 | ||||
-rw-r--r-- | src/commands/moulberry-bush/rule.ts | 10 | ||||
-rw-r--r-- | src/commands/server-config/prefix.ts | 8 |
12 files changed, 49 insertions, 47 deletions
diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index 3194ce2..4d6cc23 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,5 +1,4 @@ import { stripIndent } from 'common-tags'; -import { ApplicationCommandOptionType } from 'discord-api-types'; import { Message } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -24,14 +23,15 @@ export default class ReloadCommand extends BushCommand { ], ownerOnly: true, typing: true, - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.BOOLEAN, + type: 'BOOLEAN', name: 'fast', description: 'Wheather to use esbuild for fast compiling or not', required: false } - ] + ], + slash: true }); } diff --git a/src/commands/dev/setLevel.ts b/src/commands/dev/setLevel.ts index 7401699..83545b2 100644 --- a/src/commands/dev/setLevel.ts +++ b/src/commands/dev/setLevel.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { Message, User } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -35,20 +34,21 @@ export default class SetLevelCommand extends BushCommand { } ], ownerOnly: true, - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to change the level of', required: true }, { - type: ApplicationCommandOptionType.INTEGER, + type: 'INTEGER', name: 'level', description: 'The level to set the user to', required: true } - ] + ], + slash: true }); } diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index 66bf5af..406ea2d 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -12,7 +12,8 @@ export default class BotInfoCommand extends BushCommand { content: 'Shows information about the bot', usage: 'botinfo', examples: ['botinfo'] - } + }, + slash: true }); } diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index 317091e..4073f74 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,5 +1,4 @@ import { stripIndent } from 'common-tags'; -import { ApplicationCommandOptionType } from 'discord-api-types'; import { Message, MessageEmbed } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -22,14 +21,15 @@ export default class HelpCommand extends BushCommand { type: 'commandAlias' } ], - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'command', description: 'The command to get help for', required: false } - ] + ], + slash: true }); } diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index feb48ad..9b3b67b 100644 --- a/src/commands/info/ping.ts +++ b/src/commands/info/ping.ts @@ -11,7 +11,8 @@ export default class PingCommand extends BushCommand { content: 'Gets the latency of the bot', usage: 'ping', examples: ['ping'] - } + }, + slash: true }); } diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index faf3aa2..58b9580 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { CommandInteraction, Message, MessageEmbed, User } from 'discord.js'; import got, { HTTPError } from 'got'; import { BushCommand } from '../../lib/extensions/BushCommand'; @@ -48,15 +47,16 @@ export default class PronounsCommand extends BushCommand { } ], clientPermissions: ['SEND_MESSAGES'], - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to get pronouns for', required: false } ], - slashEphemeral: true // I'll add dynamic checking to this later + slashEphemeral: true, // I'll add dynamic checking to this later + slash: true }); } async sendResponse(message: Message | CommandInteraction, user: User, author: boolean): Promise<void> { 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 <member> <reason> [--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 <member> <reason>', 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 }); } diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index 7eb90c5..42e0d77 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { Message, MessageEmbed } from 'discord.js'; import got from 'got'; import { BushCommand } from '../../lib/extensions/BushCommand'; @@ -64,14 +63,15 @@ export default class CapePermissionsCommand extends BushCommand { ], clientPermissions: ['EMBED_LINKS', 'SEND_MESSAGES'], channel: 'guild', - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'user', description: 'The username of the player to see the cape permissions of', required: true } - ] + ], + slash: true }); } private async getResponse(user: string): Promise<{ content?: string; embeds?: MessageEmbed[] }> { diff --git a/src/commands/moulberry-bush/level.ts b/src/commands/moulberry-bush/level.ts index f53aa64..64d6dad 100644 --- a/src/commands/moulberry-bush/level.ts +++ b/src/commands/moulberry-bush/level.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { CommandInteractionOption, Message, User } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -32,14 +31,15 @@ export default class LevelCommand extends BushCommand { } } ], - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to get the level of', required: false } - ] + ], + slash: true }); } diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index b71b42f..c11c5d2 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -1,5 +1,4 @@ import { Argument } from 'discord-akairo'; -import { ApplicationCommandOptionType } from 'discord-api-types'; import { CommandInteraction, Message, MessageEmbed, User } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -98,20 +97,21 @@ export default class RuleCommand extends BushCommand { ], clientPermissions: ['EMBED_LINKS', 'SEND_MESSAGES'], channel: 'guild', - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.INTEGER, + type: 'INTEGER', name: 'rule', description: 'The rule to show', required: false }, { - type: ApplicationCommandOptionType.USER, + type: 'USER', name: 'user', description: 'The user to ping', required: false } - ] + ], + slash: true }); } private getResponse( diff --git a/src/commands/server-config/prefix.ts b/src/commands/server-config/prefix.ts index 9cdc331..28f8496 100644 --- a/src/commands/server-config/prefix.ts +++ b/src/commands/server-config/prefix.ts @@ -1,4 +1,3 @@ -import { ApplicationCommandOptionType } from 'discord-api-types'; import { Guild as DiscordGuild, Message } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushInteractionMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -21,14 +20,15 @@ export default class PrefixCommand extends BushCommand { usage: 'prefix [prefix]', examples: ['prefix', 'prefix +'] }, - slashCommandOptions: [ + slashOptions: [ { - type: ApplicationCommandOptionType.STRING, + type: 'STRING', name: 'prefix', description: 'The prefix to set for this server', required: false } - ] + ], + slash: true }); } |