aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/prefix.ts8
-rw-r--r--src/commands/dev/reload.ts8
-rw-r--r--src/commands/dev/setLevel.ts10
-rw-r--r--src/commands/info/botInfo.ts3
-rw-r--r--src/commands/info/help.ts8
-rw-r--r--src/commands/info/ping.ts3
-rw-r--r--src/commands/info/pronouns.ts8
-rw-r--r--src/commands/moderation/ban.ts12
-rw-r--r--src/commands/moderation/kick.ts10
-rw-r--r--src/commands/moulberry-bush/capePerms.ts8
-rw-r--r--src/commands/moulberry-bush/level.ts8
-rw-r--r--src/commands/moulberry-bush/rule.ts10
12 files changed, 49 insertions, 47 deletions
diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts
index c20cfa5..9ddf81b 100644
--- a/src/commands/config/prefix.ts
+++ b/src/commands/config/prefix.ts
@@ -1,4 +1,3 @@
-import { ApplicationCommandOptionType } from 'discord-api-types';
import { Guild as DiscordGuild, Message } from 'discord.js';
import { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -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
});
}
diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts
index 82a98a0..9aee9a7 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -24,14 +23,15 @@ export default class ReloadCommand extends BushCommand {
],
ownerOnly: true,
typing: true,
- slashCommandOptions: [
+ slashOptions: [
{
- type: ApplicationCommandOptionType.BOOLEAN,
+ type: 'BOOLEAN',
name: 'fast',
description: 'Whether 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 4f97528..5a702e9 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -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 8dac8ee..e7998a4 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -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 f0d017e..f0b4a2f 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 bade100..83aa5ca 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
@@ -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 4847d19..a493071 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
@@ -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 7bd53e0..b97fe91 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 380ed2d..1592175 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
@@ -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 674b776..16cda5e 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 { SlashCommandOption } from '../../lib/extensions/BushClientUtil';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -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(