From aec34d6f32f682bc7326a375507707edb2416bac Mon Sep 17 00:00:00 2001 From: samarmeena Date: Sun, 30 Jun 2024 01:17:33 +0530 Subject: [PATCH 1/3] refactor(discordx): discordjs builders support --- .../builders/commands/autocomplete.ts | 41 ++++ .../examples/builders/commands/choice.ts | 36 ++++ .../examples/builders/commands/hello.ts | 33 ++++ .../examples/builders/commands/ping.ts | 20 ++ packages/discordx/examples/builders/main.ts | 55 ++++++ .../discordx/examples/builders/tsconfig.json | 17 ++ .../examples/slash/commands/transformer.ts | 16 +- .../decorators/classes/DApplicationCommand.ts | 6 +- .../classes/DApplicationCommandOption.ts | 2 + .../src/decorators/decorators/Slash.ts | 76 ++++++-- .../src/decorators/decorators/SlashOption.ts | 177 ++++++++++++++++-- packages/discordx/src/types/public/slash.ts | 9 +- 12 files changed, 441 insertions(+), 47 deletions(-) create mode 100644 packages/discordx/examples/builders/commands/autocomplete.ts create mode 100644 packages/discordx/examples/builders/commands/choice.ts create mode 100644 packages/discordx/examples/builders/commands/hello.ts create mode 100644 packages/discordx/examples/builders/commands/ping.ts create mode 100644 packages/discordx/examples/builders/main.ts create mode 100644 packages/discordx/examples/builders/tsconfig.json diff --git a/packages/discordx/examples/builders/commands/autocomplete.ts b/packages/discordx/examples/builders/commands/autocomplete.ts new file mode 100644 index 000000000..52e215dc4 --- /dev/null +++ b/packages/discordx/examples/builders/commands/autocomplete.ts @@ -0,0 +1,41 @@ +/* + * ------------------------------------------------------------------------------------------------------- + * Copyright (c) Vijay Meena (https://github.com/samarmeena). All rights reserved. + * Licensed under the Apache License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------------------- + */ +import { + AutocompleteInteraction, + SlashCommandBuilder, + SlashCommandStringOption, + type CommandInteraction, +} from "discord.js"; +import { Discord, Slash, SlashOption } from "discordx"; + +const cmd = new SlashCommandBuilder() + .setName("planet-auto") + .setDescription("Select a planet"); + +const planet_option = new SlashCommandStringOption() + .setName("planet") + .setDescription("Choose a planet") + .setRequired(true) + .setAutocomplete(true); + +@Discord() +export class Example { + @Slash(cmd) + async hello( + @SlashOption(planet_option) planet: string, + interaction: CommandInteraction | AutocompleteInteraction, + ): Promise { + if (interaction.isAutocomplete()) { + interaction.respond([ + { name: "Earth", value: "Earth" }, + { name: "Mars", value: "Mars" }, + ]); + } else { + await interaction.reply(`:rocket: going to ${planet}`); + } + } +} diff --git a/packages/discordx/examples/builders/commands/choice.ts b/packages/discordx/examples/builders/commands/choice.ts new file mode 100644 index 000000000..f444c9f4a --- /dev/null +++ b/packages/discordx/examples/builders/commands/choice.ts @@ -0,0 +1,36 @@ +/* + * ------------------------------------------------------------------------------------------------------- + * Copyright (c) Vijay Meena (https://github.com/samarmeena). All rights reserved. + * Licensed under the Apache License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------------------- + */ +import { + SlashCommandBuilder, + SlashCommandStringOption, + type CommandInteraction, +} from "discord.js"; +import { Discord, Slash, SlashOption } from "discordx"; + +const cmd = new SlashCommandBuilder() + .setName("planet") + .setDescription("Select a planet"); + +const planet_option = new SlashCommandStringOption() + .setName("planet") + .setDescription("Choose a planet") + .setRequired(true) + .addChoices([ + { name: "Earth", value: "Earth" }, + { name: "Mars", value: "Mars" }, + ]); + +@Discord() +export class Example { + @Slash(cmd) + async hello( + @SlashOption(planet_option) planet: string, + interaction: CommandInteraction, + ): Promise { + await interaction.reply(`:rocket: going to ${planet}`); + } +} diff --git a/packages/discordx/examples/builders/commands/hello.ts b/packages/discordx/examples/builders/commands/hello.ts new file mode 100644 index 000000000..a35e222bf --- /dev/null +++ b/packages/discordx/examples/builders/commands/hello.ts @@ -0,0 +1,33 @@ +/* + * ------------------------------------------------------------------------------------------------------- + * Copyright (c) Vijay Meena (https://github.com/samarmeena). All rights reserved. + * Licensed under the Apache License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------------------- + */ +import { + SlashCommandBuilder, + SlashCommandMentionableOption, + User, + type CommandInteraction, +} from "discord.js"; +import { Discord, Slash, SlashOption } from "discordx"; + +const cmd = new SlashCommandBuilder() + .setName("hello") + .setDescription("Say hello!"); + +const user_option = new SlashCommandMentionableOption() + .setName("user") + .setDescription("Mention user to say hello to.") + .setRequired(true); + +@Discord() +export class Example { + @Slash(cmd) + async hello( + @SlashOption(user_option) user: User, + interaction: CommandInteraction, + ): Promise { + await interaction.reply(`:wave: ${user}`); + } +} diff --git a/packages/discordx/examples/builders/commands/ping.ts b/packages/discordx/examples/builders/commands/ping.ts new file mode 100644 index 000000000..fa679d0b2 --- /dev/null +++ b/packages/discordx/examples/builders/commands/ping.ts @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------------------------------------------------- + * Copyright (c) Vijay Meena (https://github.com/samarmeena). All rights reserved. + * Licensed under the Apache License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------------------- + */ +import { SlashCommandBuilder, type CommandInteraction } from "discord.js"; +import { Discord, Slash } from "discordx"; + +const cmd = new SlashCommandBuilder() + .setName("ping") + .setDescription("Reply with pong!"); + +@Discord() +export class Example { + @Slash(cmd) + async ping(interaction: CommandInteraction): Promise { + await interaction.reply("Pong"); + } +} diff --git a/packages/discordx/examples/builders/main.ts b/packages/discordx/examples/builders/main.ts new file mode 100644 index 000000000..0c7eaf851 --- /dev/null +++ b/packages/discordx/examples/builders/main.ts @@ -0,0 +1,55 @@ +/* + * ------------------------------------------------------------------------------------------------------- + * Copyright (c) Vijay Meena (https://github.com/samarmeena). All rights reserved. + * Licensed under the Apache License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------------------- + */ +import { dirname, importx } from "@discordx/importer"; +import { IntentsBitField } from "discord.js"; +import { Client } from "discordx"; + +export class Main { + private static _client: Client; + + static get Client(): Client { + return this._client; + } + + static async start(): Promise { + this._client = new Client({ + // botGuilds: [(client) => client.guilds.cache.map((guild) => guild.id)], + intents: [ + IntentsBitField.Flags.Guilds, + IntentsBitField.Flags.GuildMessages, + IntentsBitField.Flags.GuildMembers, + ], + silent: false, + }); + + this._client.once("ready", () => { + // An example of how guild commands can be cleared + // + // await this._client.clearApplicationCommands( + // ...this._client.guilds.cache.map((guild) => guild.id) + // ); + + void this._client.initApplicationCommands(); + + console.log(">> Bot started"); + }); + + this._client.on("interactionCreate", (interaction) => { + this._client.executeInteraction(interaction); + }); + + await importx(`${dirname(import.meta.url)}/commands/**/*.{js,ts}`); + + // let's start the bot + if (!process.env.BOT_TOKEN) { + throw Error("Could not find BOT_TOKEN in your environment"); + } + await this._client.login(process.env.BOT_TOKEN); + } +} + +void Main.start(); diff --git a/packages/discordx/examples/builders/tsconfig.json b/packages/discordx/examples/builders/tsconfig.json new file mode 100644 index 000000000..d028f12a2 --- /dev/null +++ b/packages/discordx/examples/builders/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "ESNext", + "target": "ESNext", + "strict": true, + "noImplicitAny": true, + "outDir": "dist", + "emitDecoratorMetadata": false, + "experimentalDecorators": true, + "strictNullChecks": true, + "noUncheckedIndexedAccess": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "Bundler", + "esModuleInterop": true + }, + "exclude": ["node_modules", "tests", "examples"] +} diff --git a/packages/discordx/examples/slash/commands/transformer.ts b/packages/discordx/examples/slash/commands/transformer.ts index fcc9fc112..ea687f00e 100644 --- a/packages/discordx/examples/slash/commands/transformer.ts +++ b/packages/discordx/examples/slash/commands/transformer.ts @@ -40,13 +40,15 @@ function DocumentTransformer( export class Example { @Slash({ description: "Save input into database", name: "save-input" }) async withTransformer( - @SlashOption({ - description: "input", - name: "input", - required: true, - transformer: DocumentTransformer, - type: ApplicationCommandOptionType.String, - }) + @SlashOption( + { + description: "input", + name: "input", + required: true, + type: ApplicationCommandOptionType.String, + }, + DocumentTransformer, + ) doc: Document, interaction: ChatInputCommandInteraction, ): Promise { diff --git a/packages/discordx/src/decorators/classes/DApplicationCommand.ts b/packages/discordx/src/decorators/classes/DApplicationCommand.ts index 67a28f207..338804099 100644 --- a/packages/discordx/src/decorators/classes/DApplicationCommand.ts +++ b/packages/discordx/src/decorators/classes/DApplicationCommand.ts @@ -18,7 +18,7 @@ import { Method } from "./Method.js"; interface CreateStructure { botIds?: string[]; - defaultMemberPermissions?: PermissionResolvable | null; + defaultMemberPermissions?: PermissionResolvable | string | null; description: string; descriptionLocalizations?: LocalizationMap | null; dmPermission?: boolean; @@ -38,7 +38,7 @@ export class DApplicationCommand extends Method { private _nameLocalizations: LocalizationMap | null; private _description: string; private _descriptionLocalizations: LocalizationMap | null; - private _defaultMemberPermissions: PermissionResolvable | null; + private _defaultMemberPermissions: PermissionResolvable | string | null; private _dmPermission: boolean; private _guilds: IGuild[]; private _group?: string; @@ -61,7 +61,7 @@ export class DApplicationCommand extends Method { this._description = value; } - get defaultMemberPermissions(): PermissionResolvable | null { + get defaultMemberPermissions(): PermissionResolvable | string | null { return this._defaultMemberPermissions; } set defaultMemberPermissions(value: PermissionResolvable | null) { diff --git a/packages/discordx/src/decorators/classes/DApplicationCommandOption.ts b/packages/discordx/src/decorators/classes/DApplicationCommandOption.ts index e34ec5663..af18b47cf 100644 --- a/packages/discordx/src/decorators/classes/DApplicationCommandOption.ts +++ b/packages/discordx/src/decorators/classes/DApplicationCommandOption.ts @@ -23,6 +23,7 @@ import type { interface CreateStructure { autocomplete?: SlashAutoCompleteOption; channelType?: ChannelType[]; + choices?: DApplicationCommandOptionChoice[]; description: string; descriptionLocalizations?: LocalizationMap | null; index?: number; @@ -168,6 +169,7 @@ export class DApplicationCommandOption extends Decorator { this._name = data.name; this._autocomplete = data.autocomplete; this._channelTypes = data.channelType?.sort(); + this._choices = data.choices ?? []; this._description = data.description; this._index = data.index; this._maxValue = data.maxValue; diff --git a/packages/discordx/src/decorators/decorators/Slash.ts b/packages/discordx/src/decorators/decorators/Slash.ts index 9e63fa4cf..1cca8caed 100644 --- a/packages/discordx/src/decorators/decorators/Slash.ts +++ b/packages/discordx/src/decorators/decorators/Slash.ts @@ -5,7 +5,7 @@ * ------------------------------------------------------------------------------------------------------- */ import type { MethodDecoratorEx } from "@discordx/internal"; -import { ApplicationCommandType } from "discord.js"; +import { ApplicationCommandType, SlashCommandBuilder } from "discord.js"; import type { ApplicationCommandOptions, @@ -18,6 +18,18 @@ import { SlashNameValidator, } from "../../index.js"; +/** + * Handle a slash command with a defined name + * + * @param options - Application command options + * ___ + * + * [View Documentation](https://discordx.js.org/docs/discordx/decorators/command/slash) + * + * @category Decorator + */ +export function Slash(options: SlashCommandBuilder): MethodDecoratorEx; + /** * Handle a slash command with a defined name * @@ -30,24 +42,62 @@ import { */ export function Slash( options: ApplicationCommandOptions, NotEmpty>, +): MethodDecoratorEx; + +/** + * Handle a slash command with a defined name + * + * @param options - Application command options + * ___ + * + * [View Documentation](https://discordx.js.org/docs/discordx/decorators/command/slash) + * + * @category Decorator + */ +export function Slash( + options: + | ApplicationCommandOptions, NotEmpty> + | SlashCommandBuilder, ): MethodDecoratorEx { return function (target: Record, key: string) { const name = options.name ?? key; SlashNameValidator(name); - const applicationCommand = DApplicationCommand.create({ - botIds: options.botIds, - defaultMemberPermissions: options.defaultMemberPermissions, - description: options.description, - descriptionLocalizations: options.descriptionLocalizations, - dmPermission: options.dmPermission ?? true, - guilds: options.guilds, - name: name, - nameLocalizations: options.nameLocalizations, - nsfw: options.nsfw, - type: ApplicationCommandType.ChatInput, - }).decorate(target.constructor, key, target[key]); + let applicationCommand: DApplicationCommand; + + if (options instanceof SlashCommandBuilder) { + if (options.options.length > 0) { + throw Error( + "The builder options feature is not supported in discordx.", + ); + } + + applicationCommand = DApplicationCommand.create({ + defaultMemberPermissions: options.default_member_permissions, + description: options.description, + descriptionLocalizations: options.description_localizations, + dmPermission: options.dm_permission ?? true, + name: name, + nameLocalizations: options.name_localizations, + nsfw: options.nsfw, + type: ApplicationCommandType.ChatInput, + }); + } else { + applicationCommand = DApplicationCommand.create({ + botIds: options.botIds, + defaultMemberPermissions: options.defaultMemberPermissions, + description: options.description, + descriptionLocalizations: options.descriptionLocalizations, + dmPermission: options.dmPermission ?? true, + guilds: options.guilds, + name: name, + nameLocalizations: options.nameLocalizations, + nsfw: options.nsfw, + type: ApplicationCommandType.ChatInput, + }); + } + applicationCommand.decorate(target.constructor, key, target[key]); MetadataStorage.instance.addApplicationCommandSlash(applicationCommand); }; } diff --git a/packages/discordx/src/decorators/decorators/SlashOption.ts b/packages/discordx/src/decorators/decorators/SlashOption.ts index 938f51c76..b7709a9e7 100644 --- a/packages/discordx/src/decorators/decorators/SlashOption.ts +++ b/packages/discordx/src/decorators/decorators/SlashOption.ts @@ -6,15 +6,56 @@ */ import type { ParameterDecoratorEx } from "@discordx/internal"; import { Modifier } from "@discordx/internal"; +import { + SlashCommandAttachmentOption, + SlashCommandBooleanOption, + SlashCommandChannelOption, + SlashCommandIntegerOption, + SlashCommandMentionableOption, + SlashCommandNumberOption, + SlashCommandRoleOption, + SlashCommandStringOption, + SlashCommandUserOption, +} from "discord.js"; -import type { NotEmpty, SlashOptionOptions, VerifyName } from "../../index.js"; +import type { + NotEmpty, + SlashOptionOptions, + TransformerFunction, + VerifyName, +} from "../../index.js"; import { DApplicationCommand, DApplicationCommandOption, + DApplicationCommandOptionChoice, MetadataStorage, SlashNameValidator, } from "../../index.js"; +/** + * Add a slash command option + * + * @param options - Slash option options + * ___ + * + * [View Documentation](https://discordx.js.org/docs/discordx/decorators/command/slash-option) + * + * @category Decorator + */ +export function SlashOption( + options: + | SlashCommandAttachmentOption + | SlashCommandBooleanOption + | SlashCommandChannelOption + | SlashCommandIntegerOption + | SlashCommandMentionableOption + | SlashCommandNumberOption + | SlashCommandRoleOption + | SlashCommandStringOption + | SlashCommandUserOption, + transformer?: TransformerFunction, +): ParameterDecoratorEx; + /** * Add a slash command option * @@ -27,26 +68,128 @@ import { */ export function SlashOption( options: SlashOptionOptions, NotEmpty>, + transformer?: TransformerFunction, +): ParameterDecoratorEx; + +/** + * Add a slash command option + * + * @param options - Slash option options + * ___ + * + * [View Documentation](https://discordx.js.org/docs/discordx/decorators/command/slash-option) + * + * @category Decorator + */ +export function SlashOption( + options: + | SlashCommandAttachmentOption + | SlashCommandBooleanOption + | SlashCommandChannelOption + | SlashCommandIntegerOption + | SlashCommandMentionableOption + | SlashCommandNumberOption + | SlashCommandRoleOption + | SlashCommandStringOption + | SlashCommandUserOption + | SlashOptionOptions, NotEmpty>, + transformer?: TransformerFunction, ): ParameterDecoratorEx { return function (target: Record, key: string, index: number) { SlashNameValidator(options.name); - const option = DApplicationCommandOption.create({ - autocomplete: options.autocomplete, - channelType: options.channelTypes, - description: options.description, - descriptionLocalizations: options.descriptionLocalizations, - index: index, - maxLength: options.maxLength, - maxValue: options.maxValue, - minLength: options.minLength, - minValue: options.minValue, - name: options.name, - nameLocalizations: options.nameLocalizations, - required: options.required, - transformer: options.transformer, - type: options.type, - }).decorate( + let option: DApplicationCommandOption; + + if ( + options instanceof SlashCommandAttachmentOption || + options instanceof SlashCommandBooleanOption || + options instanceof SlashCommandRoleOption || + options instanceof SlashCommandMentionableOption || + options instanceof SlashCommandUserOption + ) { + option = DApplicationCommandOption.create({ + description: options.description, + descriptionLocalizations: options.description_localizations, + index: index, + name: options.name, + nameLocalizations: options.name_localizations, + required: options.required, + transformer, + type: options.type, + }); + } else if (options instanceof SlashCommandChannelOption) { + option = DApplicationCommandOption.create({ + channelType: options.channel_types, + description: options.description, + descriptionLocalizations: options.description_localizations, + index: index, + name: options.name, + nameLocalizations: options.name_localizations, + required: options.required, + transformer, + type: options.type, + }); + } else if ( + options instanceof SlashCommandIntegerOption || + options instanceof SlashCommandNumberOption + ) { + const choices = options.choices?.map((choice) => + DApplicationCommandOptionChoice.create(choice), + ); + + option = DApplicationCommandOption.create({ + autocomplete: options.autocomplete, + choices, + description: options.description, + descriptionLocalizations: options.description_localizations, + index: index, + maxValue: options.max_value, + minValue: options.min_value, + name: options.name, + nameLocalizations: options.name_localizations, + required: options.required, + transformer, + type: options.type, + }); + } else if (options instanceof SlashCommandStringOption) { + const choices = options.choices?.map((choice) => + DApplicationCommandOptionChoice.create(choice), + ); + + option = DApplicationCommandOption.create({ + autocomplete: options.autocomplete, + choices, + description: options.description, + descriptionLocalizations: options.description_localizations, + index: index, + maxLength: options.max_length, + minLength: options.min_length, + name: options.name, + nameLocalizations: options.name_localizations, + required: options.required, + transformer, + type: options.type, + }); + } else { + option = DApplicationCommandOption.create({ + autocomplete: options.autocomplete, + channelType: options.channelTypes, + description: options.description, + descriptionLocalizations: options.descriptionLocalizations, + index: index, + maxLength: options.maxLength, + maxValue: options.maxValue, + minLength: options.minLength, + minValue: options.minValue, + name: options.name, + nameLocalizations: options.nameLocalizations, + required: options.required, + transformer: transformer, + type: options.type, + }); + } + + option.decorate( target.constructor, key, target[key], diff --git a/packages/discordx/src/types/public/slash.ts b/packages/discordx/src/types/public/slash.ts index 67b732523..b787c37c2 100644 --- a/packages/discordx/src/types/public/slash.ts +++ b/packages/discordx/src/types/public/slash.ts @@ -14,11 +14,7 @@ import type { PermissionResolvable, } from "discord.js"; -import type { - DApplicationCommand, - IGuild, - TransformerFunction, -} from "../../index.js"; +import type { DApplicationCommand, IGuild } from "../../index.js"; export interface ApplicationCommandOptions< T extends string, @@ -48,7 +44,6 @@ export interface SlashOptionBaseOptions { nameLocalizations?: LocalizationMap; nsfw?: boolean; required?: boolean; - transformer?: TransformerFunction; type: Exclude< ApplicationCommandOptionType, | ApplicationCommandOptionType.Subcommand @@ -120,7 +115,7 @@ export type SlashAutoCompleteOption = ) => void | Promise); export interface ApplicationCommandDataEx { - defaultMemberPermissions?: PermissionResolvable | null; + defaultMemberPermissions?: PermissionResolvable | string | null; description?: string; descriptionLocalizations?: LocalizationMap | null; dmPermission?: boolean; From 85191264652388f1b5bb756085079a55ac116c1e Mon Sep 17 00:00:00 2001 From: samarmeena Date: Sun, 30 Jun 2024 01:24:26 +0530 Subject: [PATCH 2/3] refactor: add doc example --- .../decorators/command/slash-option.md | 48 ++++++++++++++++--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/docs/docs/discordx/decorators/command/slash-option.md b/docs/docs/discordx/decorators/command/slash-option.md index 5869ac985..013799737 100644 --- a/docs/docs/discordx/decorators/command/slash-option.md +++ b/docs/docs/discordx/decorators/command/slash-option.md @@ -44,6 +44,38 @@ class Example { } ``` +## Create option using discord.js builders + +```ts +import { + SlashCommandBuilder, + SlashCommandMentionableOption, + User, + type CommandInteraction, +} from "discord.js"; +import { Discord, Slash, SlashOption } from "discordx"; + +const cmd = new SlashCommandBuilder() + .setName("hello") + .setDescription("Say hello!"); + +const user_option = new SlashCommandMentionableOption() + .setName("user") + .setDescription("Mention user to say hello to.") + .setRequired(true); + +@Discord() +export class Example { + @Slash(cmd) + async hello( + @SlashOption(user_option) user: User, + interaction: CommandInteraction, + ): Promise { + await interaction.reply(`:wave: ${user}`); + } +} +``` + ## Transformer Act as middleware for your parameters. Take a look at the following example to see how useful it is. @@ -81,13 +113,15 @@ function DocumentTransformer( export class Example { @Slash({ description: "Save input into database", name: "save-input" }) async withTransformer( - @SlashOption({ - description: "input", - name: "input", - required: true, - transformer: DocumentTransformer, - type: ApplicationCommandOptionType.String, - }) + @SlashOption( + { + description: "input", + name: "input", + required: true, + type: ApplicationCommandOptionType.String, + }, + DocumentTransformer, + ) doc: Document, interaction: ChatInputCommandInteraction, ): Promise { From 3c6ac5200a71be2a7e0f1d7c1018718085969bbc Mon Sep 17 00:00:00 2001 From: samarmeena Date: Sun, 30 Jun 2024 01:29:29 +0530 Subject: [PATCH 3/3] refactor: bump version --- package-lock.json | 6 +++--- packages/discordx/CHANGELOG.md | 6 ++++++ packages/discordx/package.json | 2 +- packages/plugin-lava-player/package.json | 2 +- packages/utilities/package.json | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 118b084c7..3af5139f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15012,7 +15012,7 @@ } }, "packages/discordx": { - "version": "11.11.3", + "version": "11.12.0", "license": "Apache-2.0", "dependencies": { "@discordx/di": "^3.3.2", @@ -15164,7 +15164,7 @@ }, "devDependencies": { "discord.js": "^14.15.3", - "discordx": "^11.11.1", + "discordx": "^11.12.0", "ts-node": "^10.9.2" }, "peerDependencies": { @@ -15205,7 +15205,7 @@ "@discordx/importer": "^1.3.1", "@discordx/pagination": "^3.5.4", "discord.js": "^14.15.3", - "discordx": "^11.11.1", + "discordx": "^11.12.0", "typescript": "5.4.5" }, "engines": { diff --git a/packages/discordx/CHANGELOG.md b/packages/discordx/CHANGELOG.md index a9d2968d7..f7b5c3934 100644 --- a/packages/discordx/CHANGELOG.md +++ b/packages/discordx/CHANGELOG.md @@ -1,5 +1,11 @@ # discordx +## 11.12.0 + +### Minor Changes + +- added support for slash command builder + ## 11.11.3 ### Patch Changes diff --git a/packages/discordx/package.json b/packages/discordx/package.json index 941e9ad92..dd36a0313 100644 --- a/packages/discordx/package.json +++ b/packages/discordx/package.json @@ -1,6 +1,6 @@ { "name": "discordx", - "version": "11.11.3", + "version": "11.12.0", "private": false, "description": "Create a discord bot with TypeScript and Decorators!", "keywords": [ diff --git a/packages/plugin-lava-player/package.json b/packages/plugin-lava-player/package.json index e458933e8..8c085165e 100644 --- a/packages/plugin-lava-player/package.json +++ b/packages/plugin-lava-player/package.json @@ -112,7 +112,7 @@ }, "devDependencies": { "discord.js": "^14.15.3", - "discordx": "^11.11.1", + "discordx": "^11.12.0", "ts-node": "^10.9.2" }, "peerDependencies": { diff --git a/packages/utilities/package.json b/packages/utilities/package.json index 0198a2776..6f1d4bff6 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -49,7 +49,7 @@ "@discordx/importer": "^1.3.1", "@discordx/pagination": "^3.5.4", "discord.js": "^14.15.3", - "discordx": "^11.11.1", + "discordx": "^11.12.0", "typescript": "5.4.5" }, "peerDependencies": {