diff --git a/apps/docs/content/docs/classes/ButtonKit.mdx b/apps/docs/content/docs/classes/ButtonKit.mdx index abad407..6de6163 100644 --- a/apps/docs/content/docs/classes/ButtonKit.mdx +++ b/apps/docs/content/docs/classes/ButtonKit.mdx @@ -3,30 +3,26 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L165) - +- [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. @@ -38,99 +34,89 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L74) +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L98) +- [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. -| 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 +| 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. -| 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 +| 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. -| Parameter | Type | Optional | Description | -| --------- | ------------------------ | -------- | ---------------- | -| emoji | ComponentEmojiResolvable | ❌ | The emoji to use | -### public setLabel(label): this +| Parameter | Type | Optional | Description | +| ----------- | ----------- | ----------- | ----------- | +| emoji | ComponentEmojiResolvable | ❌ | The emoji to use | +### public setLabel(label): this 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 | -### public setSKUId(skuId): this +| 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. -| 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 +| 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. -| Parameter | Type | Optional | Description | -| --------- | ----------- | -------- | ---------------- | -| style | ButtonStyle | ❌ | The style to use | -### public setURL(url): this +| Parameter | Type | Optional | Description | +| ----------- | ----------- | ----------- | ----------- | +| style | ButtonStyle | ❌ | The style to use | +### public setURL(url): this 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 | -### public toJSON(): APIButtonComponent +| 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\ | ❌ | +| Parameter | Type | Optional | +| ----------- | ----------- | ----------- | +| other | APIButtonComponent | JSONEncodable\ | ❌ | \ No newline at end of file diff --git a/apps/docs/content/docs/classes/CommandKit.mdx b/apps/docs/content/docs/classes/CommandKit.mdx index 00f3fb6..1c27ba4 100644 --- a/apps/docs/content/docs/classes/CommandKit.mdx +++ b/apps/docs/content/docs/classes/CommandKit.mdx @@ -3,82 +3,65 @@ 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 - -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L8) - +### 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L38) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L45) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L125) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L141) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L169) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L176) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L162) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L148) - +- [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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L155) +- [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". -| Parameter | Type | Optional | -| --------- | ------------- | -------- | -| type | ReloadOptions | ✅ | -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/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)> +| 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". -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/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)> +- [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". -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L117) + + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L117) \ No newline at end of file diff --git a/apps/docs/content/docs/classes/index.mdx b/apps/docs/content/docs/classes/index.mdx index b29cf95..27149b1 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 e287646..f52703e 100644 --- a/apps/docs/content/docs/enums/ReloadType.mdx +++ b/apps/docs/content/docs/enums/ReloadType.mdx @@ -5,9 +5,10 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L284) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L284) \ No newline at end of file diff --git a/apps/docs/content/docs/enums/index.mdx b/apps/docs/content/docs/enums/index.mdx index bdb7cb2..145c771 100644 --- a/apps/docs/content/docs/enums/index.mdx +++ b/apps/docs/content/docs/enums/index.mdx @@ -5,10 +5,4 @@ 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 9026c1b..d31ac3a 100644 --- a/apps/docs/content/docs/functions/defineConfig.mdx +++ b/apps/docs/content/docs/functions/defineConfig.mdx @@ -3,10 +3,12 @@ title: defineConfig description: No description provided --- -### defineConfig(config): Partial\<[CommandKitConfig](/docs/types/CommandKitConfig.mdx)> -| Parameter | Type | Optional | -| --------- | -------------------------------------------------------------------- | -------- | -| config | PartialConfig\<[CommandKitConfig](/docs/types/CommandKitConfig.mdx)> | ❌ | +### defineConfig(config): Partial\<[CommandKitConfig](/docs/types/CommandKitConfig)> -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L71) +| 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 diff --git a/apps/docs/content/docs/functions/getConfig.mdx b/apps/docs/content/docs/functions/getConfig.mdx index e86a81f..866fbde 100644 --- a/apps/docs/content/docs/functions/getConfig.mdx +++ b/apps/docs/content/docs/functions/getConfig.mdx @@ -3,6 +3,7 @@ title: getConfig description: No description provided --- -### getConfig(): [CommandKitConfig](/docs/types/CommandKitConfig.mdx) -- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L60) +### 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 diff --git a/apps/docs/content/docs/functions/index.mdx b/apps/docs/content/docs/functions/index.mdx index 97cfcc0..1cf4893 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 2a98411..45e7ab0 100644 --- a/apps/docs/content/docs/index.mdx +++ b/apps/docs/content/docs/index.mdx @@ -3,143 +3,70 @@ 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 8d9d90e..4c1f078 100644 --- a/apps/docs/content/docs/types/AutocompleteProps.mdx +++ b/apps/docs/content/docs/types/AutocompleteProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L146) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L146) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandContext.mdx b/apps/docs/content/docs/types/CommandContext.mdx index bd52f4a..04e5f09 100644 --- a/apps/docs/content/docs/types/CommandContext.mdx +++ b/apps/docs/content/docs/types/CommandContext.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L80) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L80) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandData.mdx b/apps/docs/content/docs/types/CommandData.mdx index ad1ddd9..5a6ca06 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L256) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L256) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandFileObject.mdx b/apps/docs/content/docs/types/CommandFileObject.mdx index e0d8d52..87fad9b 100644 --- a/apps/docs/content/docs/types/CommandFileObject.mdx +++ b/apps/docs/content/docs/types/CommandFileObject.mdx @@ -7,13 +7,14 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L101) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L101) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx index 05ee2c9..29cee3d 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L17) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L17) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx index a51702b..668d689 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L23) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L23) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx index 6306ecf..723d7ff 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L21) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L21) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitConfig.mdx b/apps/docs/content/docs/types/CommandKitConfig.mdx index 0a5cd71..dadfe3d 100644 --- a/apps/docs/content/docs/types/CommandKitConfig.mdx +++ b/apps/docs/content/docs/types/CommandKitConfig.mdx @@ -5,18 +5,19 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L1) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/config.ts#L1) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitData.mdx b/apps/docs/content/docs/types/CommandKitData.mdx index c1fb5a7..645c0f8 100644 --- a/apps/docs/content/docs/types/CommandKitData.mdx +++ b/apps/docs/content/docs/types/CommandKitData.mdx @@ -7,20 +7,21 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L71) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L71) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandKitOptions.mdx b/apps/docs/content/docs/types/CommandKitOptions.mdx index 91b6c7d..8720479 100644 --- a/apps/docs/content/docs/types/CommandKitOptions.mdx +++ b/apps/docs/content/docs/types/CommandKitOptions.mdx @@ -7,17 +7,18 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L20) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L20) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandObject.mdx b/apps/docs/content/docs/types/CommandObject.mdx index 26608e1..42e1f89 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L258) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L258) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandOptions.mdx b/apps/docs/content/docs/types/CommandOptions.mdx index 9876f34..1fcead9 100644 --- a/apps/docs/content/docs/types/CommandOptions.mdx +++ b/apps/docs/content/docs/types/CommandOptions.mdx @@ -7,12 +7,13 @@ 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L215) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L215) \ No newline at end of file diff --git a/apps/docs/content/docs/types/CommandProps.mdx b/apps/docs/content/docs/types/CommandProps.mdx index 64133ab..909728c 100644 --- a/apps/docs/content/docs/types/CommandProps.mdx +++ b/apps/docs/content/docs/types/CommandProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L123) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L123) \ No newline at end of file diff --git a/apps/docs/content/docs/types/ContextMenuCommandProps.mdx b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx index 49a3e62..f5bea29 100644 --- a/apps/docs/content/docs/types/ContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L166) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L166) \ No newline at end of file diff --git a/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx index d4816ce..e5dc4f4 100644 --- a/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L183) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L183) \ No newline at end of file diff --git a/apps/docs/content/docs/types/ReloadOptions.mdx b/apps/docs/content/docs/types/ReloadOptions.mdx index 1239bf2..ad34cd4 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L118) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L118) \ No newline at end of file diff --git a/apps/docs/content/docs/types/SlashCommandProps.mdx b/apps/docs/content/docs/types/SlashCommandProps.mdx index 00f551a..fe575da 100644 --- a/apps/docs/content/docs/types/SlashCommandProps.mdx +++ b/apps/docs/content/docs/types/SlashCommandProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L156) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L156) \ No newline at end of file diff --git a/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx index 795db07..c0d8e04 100644 --- a/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx +++ b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx @@ -7,10 +7,11 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L176) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L176) \ No newline at end of file diff --git a/apps/docs/content/docs/types/ValidationProps.mdx b/apps/docs/content/docs/types/ValidationProps.mdx index d0454de..d04c338 100644 --- a/apps/docs/content/docs/types/ValidationProps.mdx +++ b/apps/docs/content/docs/types/ValidationProps.mdx @@ -7,11 +7,12 @@ 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.mdx) | 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L190) + +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L190) \ No newline at end of file diff --git a/apps/docs/content/docs/types/index.mdx b/apps/docs/content/docs/types/index.mdx index 5a44fb9..cc203a9 100644 --- a/apps/docs/content/docs/types/index.mdx +++ b/apps/docs/content/docs/types/index.mdx @@ -7,107 +7,39 @@ 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 e0aae25..05e4f67 100644 --- a/apps/docs/content/docs/variables/index.mdx +++ b/apps/docs/content/docs/variables/index.mdx @@ -5,10 +5,4 @@ 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 593ea4a..a9d0b62 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/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/index.ts#L11) +- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/index.ts#L11) \ No newline at end of file diff --git a/package.json b/package.json index 7f6bb51..13d6540 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,10 @@ }, "devDependencies": { "@types/node": "^22.10.2", - "micro-docgen": "^0.3.2", + "micro-docgen": "^0.3.3", "prettier": "^3.0.3", "tsx": "^4.7.0", "turbo": "^2.3.3" }, "packageManager": "pnpm@9.15.0" -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a67f95..f3d8994 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^22.10.2 version: 22.10.2 micro-docgen: - specifier: ^0.3.2 - version: 0.3.2 + specifier: ^0.3.3 + version: 0.3.3 prettier: specifier: ^3.0.3 version: 3.0.3 @@ -2894,8 +2894,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micro-docgen@0.3.2: - resolution: {integrity: sha512-TccygfKfaRX39CAb2nmeX5jY7/6pw7TwuwQgTrMPwgSmffJ2pbEIB73MrjZJVypQPt+UkVxdsds7orUKwe3d8Q==} + micro-docgen@0.3.3: + resolution: {integrity: sha512-bXSOu9R+7xic5jW3Ry5qIOgGZO+24f/fAQVnHAMU/siXT1EPOwHaxu5WBWfa2Te/mw8OVmEQxbzmVDsGr1L3yA==} hasBin: true micromark-core-commonmark@2.0.2: @@ -7197,7 +7197,7 @@ snapshots: merge2@1.4.1: {} - micro-docgen@0.3.2: + micro-docgen@0.3.3: dependencies: commander: 12.1.0 common-tags: 1.8.2 diff --git a/scripts/docgen.ts b/scripts/docgen.ts index e962ebc..2bb42ce 100644 --- a/scripts/docgen.ts +++ b/scripts/docgen.ts @@ -10,6 +10,7 @@ async function main() { typeLinkerBasePath: '/docs', extension: 'mdx', includeMarkdownHeaders: true, + omitTypeLinkerExtension: true, output: './apps/docs/content/docs', });