From 6ce87cba44f953b46a72430cb1272818640529f4 Mon Sep 17 00:00:00 2001 From: twlite <46562212+twlite@users.noreply.github.com> Date: Sat, 14 Dec 2024 23:30:45 +0545 Subject: [PATCH] chore: prettier --- apps/docs/content/docs/classes/ButtonKit.mdx | 112 ++++++------ apps/docs/content/docs/classes/CommandKit.mdx | 53 ++++-- apps/docs/content/docs/classes/index.mdx | 2 +- apps/docs/content/docs/enums/ReloadType.mdx | 11 +- apps/docs/content/docs/enums/index.mdx | 8 +- .../content/docs/functions/defineConfig.mdx | 10 +- .../docs/content/docs/functions/getConfig.mdx | 3 +- apps/docs/content/docs/functions/index.mdx | 2 +- apps/docs/content/docs/index.mdx | 159 +++++++++++++----- .../content/docs/types/AutocompleteProps.mdx | 13 +- .../content/docs/types/CommandContext.mdx | 13 +- apps/docs/content/docs/types/CommandData.mdx | 2 +- .../content/docs/types/CommandFileObject.mdx | 19 +-- ...tonBuilderInteractionCollectorDispatch.mdx | 4 +- ...nteractionCollectorDispatchContextData.mdx | 4 +- .../types/CommandKitButtonBuilderOnEnd.mdx | 4 +- .../content/docs/types/CommandKitConfig.mdx | 29 ++-- .../content/docs/types/CommandKitData.mdx | 33 ++-- .../content/docs/types/CommandKitOptions.mdx | 27 ++- .../docs/content/docs/types/CommandObject.mdx | 4 +- .../content/docs/types/CommandOptions.mdx | 17 +- apps/docs/content/docs/types/CommandProps.mdx | 13 +- .../docs/types/ContextMenuCommandProps.mdx | 13 +- .../types/MessageContextMenuCommandProps.mdx | 13 +- .../docs/content/docs/types/ReloadOptions.mdx | 2 +- .../content/docs/types/SlashCommandProps.mdx | 13 +- .../types/UserContextMenuCommandProps.mdx | 13 +- .../content/docs/types/ValidationProps.mdx | 15 +- apps/docs/content/docs/types/index.mdx | 140 +++++++++++---- apps/docs/content/docs/variables/index.mdx | 8 +- apps/docs/content/docs/variables/version.mdx | 2 +- package.json | 2 +- 32 files changed, 465 insertions(+), 298 deletions(-) diff --git a/apps/docs/content/docs/classes/ButtonKit.mdx b/apps/docs/content/docs/classes/ButtonKit.mdx index 6de6163..12710f2 100644 --- a/apps/docs/content/docs/classes/ButtonKit.mdx +++ b/apps/docs/content/docs/classes/ButtonKit.mdx @@ -3,26 +3,30 @@ title: ButtonKit description: No description provided --- - ## ButtonKit extends ButtonBuilder - ```typescript -ButtonKit(data) +ButtonKit(data); ``` -| Parameter | Type | Optional | -| ----------- | ----------- | ----------- | -| data | Partial\ \| Partial\ | ✅ | +| Parameter | Type | Optional | +| --------- | ------------------------------------------------------------- | -------- | +| data | Partial\ \| Partial\ | ✅ | ## Properties + ### public data: any + The API data associated with this component. ## Methods + ### public dispose(): ButtonKit + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L165) + ### public onClick(handler, data?): this + Sets up an inline interaction collector for this button. This collector by default allows as many interactions as possible if it is actively used. If unused, this expires after 24 hours or custom time if specified. @@ -34,89 +38,99 @@ const button = new ButtonKit() const row = new ActionRowBuilder().addComponents(button); -const message = await channel.send({ content: 'Click the button', components: [row] }); +const message = await channel.send({ + content: 'Click the button', + components: [row], +}); -button.onClick(async (interaction) => { - await interaction.reply('You clicked me!'); -}, { message }); +button.onClick( + async (interaction) => { + await interaction.reply('You clicked me!'); + }, + { message }, +); // Remove onClick handler and destroy the interaction collector button.onClick(null); ``` -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| handler | CommandKitButtonBuilderInteractionCollectorDispatch | ❌ | The handler to run when the button is clicked | -| data | CommandKitButtonBuilderInteractionCollectorDispatchContextData | ✅ | The context data to use for the interaction collector | - +| Parameter | Type | Optional | Description | +| --------- | -------------------------------------------------------------- | -------- | ----------------------------------------------------- | +| handler | CommandKitButtonBuilderInteractionCollectorDispatch | ❌ | The handler to run when the button is clicked | +| data | CommandKitButtonBuilderInteractionCollectorDispatchContextData | ✅ | The context data to use for the interaction collector | - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L74) + ### public onEnd(handler): this -| Parameter | Type | Optional | -| ----------- | ----------- | ----------- | -| handler | CommandKitButtonBuilderOnEnd | ❌ | +| Parameter | Type | Optional | +| --------- | ---------------------------- | -------- | +| handler | CommandKitButtonBuilderOnEnd | ❌ | - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L98) + ### public setCustomId(customId): this -Sets the custom id for this button. +Sets the custom id for this button. +| Parameter | Type | Optional | Description | +| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------------- | +| customId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The custom id to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| customId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The custom id to use | ### public setDisabled(disabled?): this -Sets whether this button is disabled. +Sets whether this button is disabled. +| Parameter | Type | Optional | Description | +| --------- | --------------------------------------------------------------------------------------------------- | -------- | ------------------------------ | +| disabled | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | ✅ | Whether to disable this button | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| disabled | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | ✅ | Whether to disable this button | ### public setEmoji(emoji): this -Sets the emoji to display on this button. +Sets the emoji to display on this button. +| Parameter | Type | Optional | Description | +| --------- | ------------------------ | -------- | ---------------- | +| emoji | ComponentEmojiResolvable | ❌ | The emoji to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| emoji | ComponentEmojiResolvable | ❌ | The emoji to use | ### public setLabel(label): this -Sets the label for this button. +Sets the label for this button. +| Parameter | Type | Optional | Description | +| --------- | ------------------------------------------------------------------------------------------------- | -------- | ---------------- | +| label | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The label to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| label | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The label to use | ### public setSKUId(skuId): this -Sets the SKU id that represents a purchasable SKU for this button. +Sets the SKU id that represents a purchasable SKU for this button. +| Parameter | Type | Optional | Description | +| --------- | ------------------------------------------------------------------------------------------------- | -------- | ----------------- | +| skuId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The SKU id to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| skuId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The SKU id to use | ### public setStyle(style): this -Sets the style of this button. +Sets the style of this button. +| Parameter | Type | Optional | Description | +| --------- | ----------- | -------- | ---------------- | +| style | ButtonStyle | ❌ | The style to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| style | ButtonStyle | ❌ | The style to use | ### public setURL(url): this -Sets the URL for this button. +Sets the URL for this button. +| Parameter | Type | Optional | Description | +| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------- | +| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The URL to use | -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The URL to use | ### public toJSON(): APIButtonComponent + ComponentBuilder.toJSON + ### public static from(other): ButtonBuilder -| Parameter | Type | Optional | -| ----------- | ----------- | ----------- | -| other | APIButtonComponent | JSONEncodable\ | ❌ | \ No newline at end of file + +| Parameter | Type | Optional | +| --------- | ------------------ | ---------------------------------- | --- | +| other | APIButtonComponent | JSONEncodable\ | ❌ | diff --git a/apps/docs/content/docs/classes/CommandKit.mdx b/apps/docs/content/docs/classes/CommandKit.mdx index 1c27ba4..16f9f2e 100644 --- a/apps/docs/content/docs/classes/CommandKit.mdx +++ b/apps/docs/content/docs/classes/CommandKit.mdx @@ -3,65 +3,82 @@ title: CommandKit description: No description provided --- - ## CommandKit - ```typescript -CommandKit(options) +CommandKit(options); ``` -| Parameter | Type | Optional | Description | -| ----------- | ----------- | ----------- | ----------- | -| options | CommandKitOptions | ❌ | The default CommandKit configuration. | +| Parameter | Type | Optional | Description | +| --------- | ----------------- | -------- | ------------------------------------- | +| options | CommandKitOptions | ❌ | The default CommandKit configuration. | ## Properties -### public static _instance: any + +### public static \_instance: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L8) + ### public client: any + Get the client attached to this CommandKit instance. - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L38) + ### public commandHandler: any + Get command handler instance. - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L45) + ### public commands: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L125) + ### public commandsPath: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L141) + ### public devGuildIds: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L169) + ### public devRoleIds: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L176) + ### public devUserIds: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L162) + ### public eventsPath: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L148) + ### public validationsPath: any + - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L155) ## Methods -### public reloadCommands(type?): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> -Updates application commands with the latest from "commandsPath". - +### public reloadCommands(type?): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> -| Parameter | Type | Optional | -| ----------- | ----------- | ----------- | -| type | ReloadOptions | ✅ | +Updates application commands with the latest from "commandsPath". +| Parameter | Type | Optional | +| --------- | ------------- | -------- | +| type | ReloadOptions | ✅ | - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L101) -### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> -Updates application events with the latest from "eventsPath". +### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> +Updates application events with the latest from "eventsPath". - [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L109) -### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> -Updates application command validations with the latest from "validationsPath". +### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)> +Updates application command validations with the latest from "validationsPath". -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L117) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L117) diff --git a/apps/docs/content/docs/classes/index.mdx b/apps/docs/content/docs/classes/index.mdx index 27149b1..b29cf95 100644 --- a/apps/docs/content/docs/classes/index.mdx +++ b/apps/docs/content/docs/classes/index.mdx @@ -7,4 +7,4 @@ description: Classes provided by CommandKit - \ No newline at end of file + diff --git a/apps/docs/content/docs/enums/ReloadType.mdx b/apps/docs/content/docs/enums/ReloadType.mdx index f52703e..de5d97f 100644 --- a/apps/docs/content/docs/enums/ReloadType.mdx +++ b/apps/docs/content/docs/enums/ReloadType.mdx @@ -5,10 +5,9 @@ description: No description provided ## ReloadType -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| Developer | 'dev' | N/A | Reload developer/guild commands. | -| Global | 'global' | N/A | Reload global commands. | +| Property | Type | Value | Description | +| --------- | -------- | ----- | -------------------------------- | +| Developer | 'dev' | N/A | Reload developer/guild commands. | +| Global | 'global' | N/A | Reload global commands. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L284) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L284) diff --git a/apps/docs/content/docs/enums/index.mdx b/apps/docs/content/docs/enums/index.mdx index 145c771..bdb7cb2 100644 --- a/apps/docs/content/docs/enums/index.mdx +++ b/apps/docs/content/docs/enums/index.mdx @@ -5,4 +5,10 @@ description: Enums provided by CommandKit # Enums - \ No newline at end of file + + + diff --git a/apps/docs/content/docs/functions/defineConfig.mdx b/apps/docs/content/docs/functions/defineConfig.mdx index d31ac3a..923c578 100644 --- a/apps/docs/content/docs/functions/defineConfig.mdx +++ b/apps/docs/content/docs/functions/defineConfig.mdx @@ -3,12 +3,10 @@ title: defineConfig description: No description provided --- - ### defineConfig(config): Partial\<[CommandKitConfig](/docs/types/CommandKitConfig)> -| Parameter | Type | Optional | -| ----------- | ----------- | ----------- | -| config | PartialConfig\<[CommandKitConfig](/docs/types/CommandKitConfig)> | ❌ | - +| Parameter | Type | Optional | +| --------- | ---------------------------------------------------------------- | -------- | +| config | PartialConfig\<[CommandKitConfig](/docs/types/CommandKitConfig)> | ❌ | -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L71) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L71) diff --git a/apps/docs/content/docs/functions/getConfig.mdx b/apps/docs/content/docs/functions/getConfig.mdx index 866fbde..0acc604 100644 --- a/apps/docs/content/docs/functions/getConfig.mdx +++ b/apps/docs/content/docs/functions/getConfig.mdx @@ -3,7 +3,6 @@ title: getConfig description: No description provided --- - ### getConfig(): [CommandKitConfig](/docs/types/CommandKitConfig) -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L60) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L60) diff --git a/apps/docs/content/docs/functions/index.mdx b/apps/docs/content/docs/functions/index.mdx index 1cf4893..97cfcc0 100644 --- a/apps/docs/content/docs/functions/index.mdx +++ b/apps/docs/content/docs/functions/index.mdx @@ -7,4 +7,4 @@ description: Functions provided by CommandKit - \ No newline at end of file + diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx index 45e7ab0..2a98411 100644 --- a/apps/docs/content/docs/index.mdx +++ b/apps/docs/content/docs/index.mdx @@ -3,70 +3,143 @@ title: commandkit description: Beginner friendly command & event handler for Discord.js --- - - - # Classes - # Types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - # Functions - # Variables - - + + + # Enums - \ No newline at end of file + + + diff --git a/apps/docs/content/docs/types/AutocompleteProps.mdx b/apps/docs/content/docs/types/AutocompleteProps.mdx index 4c1f078..68f9334 100644 --- a/apps/docs/content/docs/types/AutocompleteProps.mdx +++ b/apps/docs/content/docs/types/AutocompleteProps.mdx @@ -7,11 +7,10 @@ description: Props for autocomplete command run functions. Props for autocomplete command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | AutocompleteInteraction\ | N/A | The current autocomplete command interaction object. | +| Property | Type | Value | Description | +| ----------- | -------------------------------------- | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | AutocompleteInteraction\ | N/A | The current autocomplete command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L146) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L146) diff --git a/apps/docs/content/docs/types/CommandContext.mdx b/apps/docs/content/docs/types/CommandContext.mdx index 04e5f09..f4b40a3 100644 --- a/apps/docs/content/docs/types/CommandContext.mdx +++ b/apps/docs/content/docs/types/CommandContext.mdx @@ -7,11 +7,10 @@ description: Represents a command context. Represents a command context. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The client that instantiated this command. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The command data. | -| interaction | Interaction\ | N/A | The interaction that triggered this command. | +| Property | Type | Value | Description | +| ----------- | -------------------------------------- | ----- | -------------------------------------------- | +| client | Client\ | N/A | The client that instantiated this command. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The command data. | +| interaction | Interaction\ | N/A | The interaction that triggered this command. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L80) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L80) diff --git a/apps/docs/content/docs/types/CommandData.mdx b/apps/docs/content/docs/types/CommandData.mdx index 5a6ca06..2c691d0 100644 --- a/apps/docs/content/docs/types/CommandData.mdx +++ b/apps/docs/content/docs/types/CommandData.mdx @@ -7,4 +7,4 @@ description: No description provided - Type: RESTPostAPIApplicationCommandsJSONBody -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L256) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L256) diff --git a/apps/docs/content/docs/types/CommandFileObject.mdx b/apps/docs/content/docs/types/CommandFileObject.mdx index 87fad9b..87d5607 100644 --- a/apps/docs/content/docs/types/CommandFileObject.mdx +++ b/apps/docs/content/docs/types/CommandFileObject.mdx @@ -7,14 +7,13 @@ description: Represents a command file. Represents a command file. -| Property | Type | Value | -| ----------- | ----------- | ----------- | -| autocomplete | ( ctx: CommandContext\ ) => void | N/A | -| category | null \| string | N/A | -| data | RESTPostAPIApplicationCommandsJSONBody | N/A | -| filePath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | -| options | CommandOptions | N/A | -| run | ( ctx: CommandContext\ ) => void | N/A | +| Property | Type | Value | +| ------------ | ------------------------------------------------------------------------------------------------- | ----- | +| autocomplete | ( ctx: CommandContext\ ) => void | N/A | +| category | null \| string | N/A | +| data | RESTPostAPIApplicationCommandsJSONBody | N/A | +| filePath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | +| options | CommandOptions | N/A | +| run | ( ctx: CommandContext\ ) => void | N/A | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L101) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L101) diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx index 29cee3d..f958a75 100644 --- a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx +++ b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx @@ -10,6 +10,6 @@ If the first argument is null, it means that the interaction collector has been - Type: ( interaction: ButtonInteraction -) => Awaitable\ + ) => Awaitable\ -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L17) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L17) diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx index 668d689..0923242 100644 --- a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx +++ b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx @@ -9,6 +9,6 @@ description: No description provided autoReset: boolean, message: Message, time: number -} & Omit\, 'filter' \| 'componentType'> + } & Omit\, 'filter' \| 'componentType'> -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L23) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L23) diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx index 723d7ff..5376172 100644 --- a/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx +++ b/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx @@ -7,6 +7,6 @@ description: No description provided - Type: ( ...args: unknown\[] -) => Awaitable\ + ) => Awaitable\ -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L21) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L21) diff --git a/apps/docs/content/docs/types/CommandKitConfig.mdx b/apps/docs/content/docs/types/CommandKitConfig.mdx index dadfe3d..ddfa60d 100644 --- a/apps/docs/content/docs/types/CommandKitConfig.mdx +++ b/apps/docs/content/docs/types/CommandKitConfig.mdx @@ -5,19 +5,18 @@ description: No description provided ## CommandKitConfig -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| antiCrash | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to include anti-crash handler in production. Defaults to `true`. | -| clearRestartLogs | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to clear default restart logs. Defaults to `true`. | -| envExtra | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to include extra env utilities. Defaults to `true`. | -| main | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The main "javascript" file of the project. | -| minify | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to minify the output. Defaults to `false`. | -| nodeOptions | Array\ | N/A | Node.js cli options. | -| outDir | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The output directory of the project. Defaults to `dist`. | -| requirePolyfill | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to polyfill `require` function. Defaults to `true`. | -| sourcemap | boolean \| 'inline' | N/A | Whether or not to include sourcemaps in production build. Defaults to `false`. | -| src | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The source directory of the project. | -| watch | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to use the watch mode. Defaults to `true`. | +| Property | Type | Value | Description | +| ---------------- | --------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------- | +| antiCrash | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to include anti-crash handler in production. Defaults to `true`. | +| clearRestartLogs | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to clear default restart logs. Defaults to `true`. | +| envExtra | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to include extra env utilities. Defaults to `true`. | +| main | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The main "javascript" file of the project. | +| minify | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to minify the output. Defaults to `false`. | +| nodeOptions | Array\ | N/A | Node.js cli options. | +| outDir | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The output directory of the project. Defaults to `dist`. | +| requirePolyfill | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to polyfill `require` function. Defaults to `true`. | +| sourcemap | boolean \| 'inline' | N/A | Whether or not to include sourcemaps in production build. Defaults to `false`. | +| src | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The source directory of the project. | +| watch | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Whether or not to use the watch mode. Defaults to `true`. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L1) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L1) diff --git a/apps/docs/content/docs/types/CommandKitData.mdx b/apps/docs/content/docs/types/CommandKitData.mdx index 645c0f8..3f0201e 100644 --- a/apps/docs/content/docs/types/CommandKitData.mdx +++ b/apps/docs/content/docs/types/CommandKitData.mdx @@ -7,21 +7,20 @@ description: Private data for the CommandKit class. Private data for the CommandKit class. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. | -| client | Client\ | N/A | The Discord.js client object to use with CommandKit. | -| commandHandler | CommandHandler | N/A | N/A | -| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. | -| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. | -| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. | -| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. | -| eventHandler | EventHandler | N/A | N/A | -| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. | -| experimental | \{ hooks: boolean } | N/A | Options for experimental features. | -| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). | -| validationHandler | ValidationHandler | N/A | N/A | -| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. | +| Property | Type | Value | Description | +| ---------------------- | --------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------- | +| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. | +| client | Client\ | N/A | The Discord.js client object to use with CommandKit. | +| commandHandler | CommandHandler | N/A | N/A | +| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. | +| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. | +| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. | +| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. | +| eventHandler | EventHandler | N/A | N/A | +| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. | +| experimental | \{ hooks: boolean } | N/A | Options for experimental features. | +| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). | +| validationHandler | ValidationHandler | N/A | N/A | +| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L71) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L71) diff --git a/apps/docs/content/docs/types/CommandKitOptions.mdx b/apps/docs/content/docs/types/CommandKitOptions.mdx index 8720479..f79b622 100644 --- a/apps/docs/content/docs/types/CommandKitOptions.mdx +++ b/apps/docs/content/docs/types/CommandKitOptions.mdx @@ -7,18 +7,17 @@ description: Options for instantiating a CommandKit handler. Options for instantiating a CommandKit handler. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. | -| client | Client\ | N/A | The Discord.js client object to use with CommandKit. | -| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. | -| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. | -| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. | -| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. | -| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. | -| experimental | \{ hooks: boolean } | N/A | Options for experimental features. | -| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). | -| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. | +| Property | Type | Value | Description | +| ---------------------- | --------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------- | +| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. | +| client | Client\ | N/A | The Discord.js client object to use with CommandKit. | +| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. | +| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. | +| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. | +| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. | +| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. | +| experimental | \{ hooks: boolean } | N/A | Options for experimental features. | +| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). | +| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L20) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L20) diff --git a/apps/docs/content/docs/types/CommandObject.mdx b/apps/docs/content/docs/types/CommandObject.mdx index 42e1f89..56d7cea 100644 --- a/apps/docs/content/docs/types/CommandObject.mdx +++ b/apps/docs/content/docs/types/CommandObject.mdx @@ -10,6 +10,6 @@ description: No description provided data: CommandData, filePath: string, options: CommandOptions -} + } -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L258) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L258) diff --git a/apps/docs/content/docs/types/CommandOptions.mdx b/apps/docs/content/docs/types/CommandOptions.mdx index 1fcead9..fe5c4e1 100644 --- a/apps/docs/content/docs/types/CommandOptions.mdx +++ b/apps/docs/content/docs/types/CommandOptions.mdx @@ -7,13 +7,12 @@ description: Additional command configuration options. Additional command configuration options. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| botPermissions | 'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps' \| Array\<'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps'> | N/A | A string or array of permissions that the bot needs to execute the current command. Used for built-in validation. | -| deleted | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is deleted/ignored on restart/reload. | -| devOnly | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is developer-only. Used for registration and built-in validation. | -| guildOnly | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is guild-only. Used for built-in validation. | -| userPermissions | 'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps' \| Array\<'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps'> | N/A | A string or array of permissions that a user needs for the current command to be executed. Used for built-in validation. | +| Property | Type | Value | Description | +| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------ | +| botPermissions | 'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps' \| Array\<'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps'> | N/A | A string or array of permissions that the bot needs to execute the current command. Used for built-in validation. | +| deleted | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is deleted/ignored on restart/reload. | +| devOnly | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is developer-only. Used for registration and built-in validation. | +| guildOnly | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | A boolean indicating whether the command is guild-only. Used for built-in validation. | +| userPermissions | 'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps' \| Array\<'CreateInstantInvite' \| 'KickMembers' \| 'BanMembers' \| 'Administrator' \| 'ManageChannels' \| 'ManageGuild' \| 'AddReactions' \| 'ViewAuditLog' \| 'PrioritySpeaker' \| 'Stream' \| 'ViewChannel' \| 'SendMessages' \| 'SendTTSMessages' \| 'ManageMessages' \| 'EmbedLinks' \| 'AttachFiles' \| 'ReadMessageHistory' \| 'MentionEveryone' \| 'UseExternalEmojis' \| 'ViewGuildInsights' \| 'Connect' \| 'Speak' \| 'MuteMembers' \| 'DeafenMembers' \| 'MoveMembers' \| 'UseVAD' \| 'ChangeNickname' \| 'ManageNicknames' \| 'ManageRoles' \| 'ManageWebhooks' \| 'ManageEmojisAndStickers' \| 'ManageGuildExpressions' \| 'UseApplicationCommands' \| 'RequestToSpeak' \| 'ManageEvents' \| 'ManageThreads' \| 'CreatePublicThreads' \| 'CreatePrivateThreads' \| 'UseExternalStickers' \| 'SendMessagesInThreads' \| 'UseEmbeddedActivities' \| 'ModerateMembers' \| 'ViewCreatorMonetizationAnalytics' \| 'UseSoundboard' \| 'CreateGuildExpressions' \| 'CreateEvents' \| 'UseExternalSounds' \| 'SendVoiceMessages' \| 'SendPolls' \| 'UseExternalApps'> | N/A | A string or array of permissions that a user needs for the current command to be executed. Used for built-in validation. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L215) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L215) diff --git a/apps/docs/content/docs/types/CommandProps.mdx b/apps/docs/content/docs/types/CommandProps.mdx index 909728c..56a4770 100644 --- a/apps/docs/content/docs/types/CommandProps.mdx +++ b/apps/docs/content/docs/types/CommandProps.mdx @@ -7,11 +7,10 @@ description: Props for command run functions. Props for command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | ChatInputCommandInteraction\ \| MessageContextMenuCommandInteraction\ \| UserContextMenuCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | ChatInputCommandInteraction\ \| MessageContextMenuCommandInteraction\ \| UserContextMenuCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L123) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L123) diff --git a/apps/docs/content/docs/types/ContextMenuCommandProps.mdx b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx index f5bea29..0fa9060 100644 --- a/apps/docs/content/docs/types/ContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx @@ -7,11 +7,10 @@ description: Props for context menu command run functions. Props for context menu command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | ContextMenuCommandInteraction\ | N/A | The current context menu command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------------------------------------- | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | ContextMenuCommandInteraction\ | N/A | The current context menu command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L166) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L166) diff --git a/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx index e5dc4f4..d06adc0 100644 --- a/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx @@ -7,11 +7,10 @@ description: Props for message context menu command run functions. Props for message context menu command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | MessageContextMenuCommandInteraction\ | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | ------------------------------------------------ | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | MessageContextMenuCommandInteraction\ | N/A | The current command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L183) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L183) diff --git a/apps/docs/content/docs/types/ReloadOptions.mdx b/apps/docs/content/docs/types/ReloadOptions.mdx index ad34cd4..be88822 100644 --- a/apps/docs/content/docs/types/ReloadOptions.mdx +++ b/apps/docs/content/docs/types/ReloadOptions.mdx @@ -9,4 +9,4 @@ A reload type for commands. - Type: 'dev' \| 'global' \| ReloadType -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L118) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L118) diff --git a/apps/docs/content/docs/types/SlashCommandProps.mdx b/apps/docs/content/docs/types/SlashCommandProps.mdx index fe575da..ec51416 100644 --- a/apps/docs/content/docs/types/SlashCommandProps.mdx +++ b/apps/docs/content/docs/types/SlashCommandProps.mdx @@ -7,11 +7,10 @@ description: Props for slash (chat input) command run functions. Props for slash (chat input) command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | ChatInputCommandInteraction\ | N/A | The current slash (chat input) command interaction object. | +| Property | Type | Value | Description | +| ----------- | --------------------------------------- | ----- | ---------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | ChatInputCommandInteraction\ | N/A | The current slash (chat input) command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L156) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L156) diff --git a/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx index c0d8e04..f8fee69 100644 --- a/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx @@ -7,11 +7,10 @@ description: Props for user context menu command run functions. Props for user context menu command run functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | UserContextMenuCommandInteraction\ | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | --------------------------------------------- | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | UserContextMenuCommandInteraction\ | N/A | The current command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L176) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L176) diff --git a/apps/docs/content/docs/types/ValidationProps.mdx b/apps/docs/content/docs/types/ValidationProps.mdx index d04c338..da5b4b6 100644 --- a/apps/docs/content/docs/types/ValidationProps.mdx +++ b/apps/docs/content/docs/types/ValidationProps.mdx @@ -7,12 +7,11 @@ description: Props for command validation functions. Props for command validation functions. -| Property | Type | Value | Description | -| ----------- | ----------- | ----------- | ----------- | -| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | -| commandObj | CommandObject | N/A | The current (local) target command object. | -| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | ChatInputCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | --------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- | +| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. | +| commandObj | CommandObject | N/A | The current (local) target command object. | +| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | ChatInputCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. | - -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L190) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L190) diff --git a/apps/docs/content/docs/types/index.mdx b/apps/docs/content/docs/types/index.mdx index cc203a9..5a44fb9 100644 --- a/apps/docs/content/docs/types/index.mdx +++ b/apps/docs/content/docs/types/index.mdx @@ -7,39 +7,107 @@ description: Interfaces provided by CommandKit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/docs/content/docs/variables/index.mdx b/apps/docs/content/docs/variables/index.mdx index 05e4f67..e0aae25 100644 --- a/apps/docs/content/docs/variables/index.mdx +++ b/apps/docs/content/docs/variables/index.mdx @@ -5,4 +5,10 @@ description: Variables provided by CommandKit # Variables - \ No newline at end of file + + + diff --git a/apps/docs/content/docs/variables/version.mdx b/apps/docs/content/docs/variables/version.mdx index a9d0b62..5245d3a 100644 --- a/apps/docs/content/docs/variables/version.mdx +++ b/apps/docs/content/docs/variables/version.mdx @@ -9,4 +9,4 @@ The current version of CommandKit. - Type: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) -- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/index.ts#L11) \ No newline at end of file +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/index.ts#L11) diff --git a/package.json b/package.json index 13d6540..9252c62 100644 --- a/package.json +++ b/package.json @@ -19,4 +19,4 @@ "turbo": "^2.3.3" }, "packageManager": "pnpm@9.15.0" -} \ No newline at end of file +}