diff --git a/.prettierignore b/.prettierignore index 3e80d18..23a7578 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ node_modules **/docs/.next/ +**/website/docs/api-reference .astro dist .commandkit diff --git a/apps/website/docs/api-reference/classes/ButtonKit.mdx b/apps/website/docs/api-reference/classes/ButtonKit.mdx index 999b83c..59520d5 100644 --- a/apps/website/docs/api-reference/classes/ButtonKit.mdx +++ b/apps/website/docs/api-reference/classes/ButtonKit.mdx @@ -3,30 +3,26 @@ title: ButtonKit description: No description provided --- + ## ButtonKit extends ButtonBuilder + ```typescript -new ButtonKit(data); +new 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L165) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L74) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L98) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/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](https://discord.js.org/docs/packages/discord.js/main/ComponentEmojiResolvable:TypeAlias) | ❌ | The emoji to use | -### public setLabel(label): this +| Parameter | Type | Optional | Description | +| ----------- | ----------- | ----------- | ----------- | +| emoji | [ComponentEmojiResolvable](https://discord.js.org/docs/packages/discord.js/main/ComponentEmojiResolvable:TypeAlias) | ❌ | 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](https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle) | ❌ | The style to use | -### public setURL(url): this +| Parameter | Type | Optional | Description | +| ----------- | ----------- | ----------- | ----------- | +| style | [ButtonStyle](https://discord-api-types.dev/api/discord-api-types-v10/enum/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](https://discord-api-types.dev/api/discord-api-types-v10#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](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) ComponentBuilder.toJSON - ### public static from(other): ButtonBuilder - -| Parameter | Type | Optional | -| --------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | --- | -| other | [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) | JSONEncodable\<[APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)> | ❌ | +| Parameter | Type | Optional | +| ----------- | ----------- | ----------- | +| other | [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) | JSONEncodable\<[APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)> | ❌ | \ No newline at end of file diff --git a/apps/website/docs/api-reference/classes/CommandKit.mdx b/apps/website/docs/api-reference/classes/CommandKit.mdx index 1379ed3..244702f 100644 --- a/apps/website/docs/api-reference/classes/CommandKit.mdx +++ b/apps/website/docs/api-reference/classes/CommandKit.mdx @@ -3,82 +3,65 @@ title: CommandKit description: No description provided --- + ## CommandKit + ```typescript -new CommandKit(options); +new 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L12) - +### public static _instance: any +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L12) ### public client: any - Get the client attached to this CommandKit instance. -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L42) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L42) ### public commandHandler: any - Get command handler instance. -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L49) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L49) ### public commands: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L128) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L128) ### public commandsPath: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L144) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L144) ### public devGuildIds: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L172) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L172) ### public devRoleIds: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L179) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L179) ### public devUserIds: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L165) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L165) ### public eventsPath: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L151) - +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L151) ### public validationsPath: any - -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L158) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L158) ## 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L104) -### 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/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L104) +### 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L112) -### 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/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L112) +### 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L120) + + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L120) \ No newline at end of file diff --git a/apps/website/docs/api-reference/enums/ReloadType.mdx b/apps/website/docs/api-reference/enums/ReloadType.mdx index 0923b1e..d586de9 100644 --- a/apps/website/docs/api-reference/enums/ReloadType.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L275) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L275) \ No newline at end of file diff --git a/apps/website/docs/api-reference/functions/defineConfig.mdx b/apps/website/docs/api-reference/functions/defineConfig.mdx index a2d343b..31c00dc 100644 --- a/apps/website/docs/api-reference/functions/defineConfig.mdx +++ b/apps/website/docs/api-reference/functions/defineConfig.mdx @@ -3,10 +3,12 @@ title: defineConfig description: No description provided --- + ### defineConfig(config): Partial\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)> -| Parameter | Type | Optional | -| --------- | ------------------------------------------------------------------------------ | -------- | -| config | PartialConfig\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)> | ❌ | +| Parameter | Type | Optional | +| ----------- | ----------- | ----------- | +| config | PartialConfig\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)> | ❌ | + -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/config.ts#L71) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/config.ts#L71) \ No newline at end of file diff --git a/apps/website/docs/api-reference/functions/getConfig.mdx b/apps/website/docs/api-reference/functions/getConfig.mdx index 0e24fd5..b3c41c1 100644 --- a/apps/website/docs/api-reference/functions/getConfig.mdx +++ b/apps/website/docs/api-reference/functions/getConfig.mdx @@ -3,6 +3,7 @@ title: getConfig description: No description provided --- + ### getConfig(): [CommandKitConfig](/docs/api-reference/types/CommandKitConfig) -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/config.ts#L60) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/config.ts#L60) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/AutocompleteProps.mdx b/apps/website/docs/api-reference/types/AutocompleteProps.mdx index 3529412..f78ce4d 100644 --- a/apps/website/docs/api-reference/types/AutocompleteProps.mdx +++ b/apps/website/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | [AutocompleteInteraction\](https://discord.js.org/docs/packages/discord.js/main/AutocompleteInteraction:Class) | N/A | The current autocomplete command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | [AutocompleteInteraction\](https://discord.js.org/docs/packages/discord.js/main/AutocompleteInteraction:Class) | N/A | The current autocomplete command interaction object. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L137) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L137) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandContext.mdx b/apps/website/docs/api-reference/types/CommandContext.mdx index 9503143..852fca7 100644 --- a/apps/website/docs/api-reference/types/CommandContext.mdx +++ b/apps/website/docs/api-reference/types/CommandContext.mdx @@ -7,10 +7,11 @@ description: Represents a command context. Represents a command context. -| Property | Type | Value | Description | -| ----------- | ------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------- | -| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The client that instantiated this command. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The command data. | -| interaction | [Interaction\](https://discord.js.org/docs/packages/discord.js/main/Interaction:Class) | N/A | The interaction that triggered this command. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The client that instantiated this command. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The command data. | +| interaction | [Interaction\](https://discord.js.org/docs/packages/discord.js/main/Interaction:Class) | N/A | The interaction that triggered this command. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L71) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L71) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandData.mdx b/apps/website/docs/api-reference/types/CommandData.mdx index 52cceaa..dc47ac1 100644 --- a/apps/website/docs/api-reference/types/CommandData.mdx +++ b/apps/website/docs/api-reference/types/CommandData.mdx @@ -7,4 +7,4 @@ description: No description provided - Type: [RESTPostAPIApplicationCommandsJSONBody](https://discord-api-types.dev/api/discord-api-types-v10#RESTPostAPIApplicationCommandsJSONBody) -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L247) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L247) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandFileObject.mdx b/apps/website/docs/api-reference/types/CommandFileObject.mdx index 3ac1ca9..13500dc 100644 --- a/apps/website/docs/api-reference/types/CommandFileObject.mdx +++ b/apps/website/docs/api-reference/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](https://discord-api-types.dev/api/discord-api-types-v10#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](https://discord-api-types.dev/api/discord-api-types-v10#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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L92) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L92) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx b/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx index 432891e..723b4f6 100644 --- a/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L17) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L17) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx index 405ffc7..4a75c40 100644 --- a/apps/website/docs/api-reference/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L23) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L23) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitButtonBuilderOnEnd.mdx b/apps/website/docs/api-reference/types/CommandKitButtonBuilderOnEnd.mdx index 70b2b68..fd2538e 100644 --- a/apps/website/docs/api-reference/types/CommandKitButtonBuilderOnEnd.mdx +++ b/apps/website/docs/api-reference/types/CommandKitButtonBuilderOnEnd.mdx @@ -7,6 +7,6 @@ description: No description provided - Type: ( reason: string - ) => Awaitable\ +) => Awaitable\ -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L21) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L21) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitConfig.mdx b/apps/website/docs/api-reference/types/CommandKitConfig.mdx index 63dafa6..04bcef9 100644 --- a/apps/website/docs/api-reference/types/CommandKitConfig.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/config.ts#L1) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/config.ts#L1) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitData.mdx b/apps/website/docs/api-reference/types/CommandKitData.mdx index 0e9ab98..a7a0765 100644 --- a/apps/website/docs/api-reference/types/CommandKitData.mdx +++ b/apps/website/docs/api-reference/types/CommandKitData.mdx @@ -7,19 +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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | 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. | -| 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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | 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. | +| 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L62) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L62) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandKitOptions.mdx b/apps/website/docs/api-reference/types/CommandKitOptions.mdx index f3d9021..425a90d 100644 --- a/apps/website/docs/api-reference/types/CommandKitOptions.mdx +++ b/apps/website/docs/api-reference/types/CommandKitOptions.mdx @@ -7,16 +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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | 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. | -| 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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | 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. | +| 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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L20) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L20) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandObject.mdx b/apps/website/docs/api-reference/types/CommandObject.mdx index d970bea..ccedcae 100644 --- a/apps/website/docs/api-reference/types/CommandObject.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L249) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L249) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandOptions.mdx b/apps/website/docs/api-reference/types/CommandOptions.mdx index 2bf6939..bef4b13 100644 --- a/apps/website/docs/api-reference/types/CommandOptions.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L206) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L206) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/CommandProps.mdx b/apps/website/docs/api-reference/types/CommandProps.mdx index 4e91d47..487859c 100644 --- a/apps/website/docs/api-reference/types/CommandProps.mdx +++ b/apps/website/docs/api-reference/types/CommandProps.mdx @@ -7,10 +7,11 @@ description: Props for command run functions. Props for command run functions. -| Property | Type | Value | Description | -| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- | -| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L114) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L114) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/ContextMenuCommandProps.mdx b/apps/website/docs/api-reference/types/ContextMenuCommandProps.mdx index 53b2187..a869ab3 100644 --- a/apps/website/docs/api-reference/types/ContextMenuCommandProps.mdx +++ b/apps/website/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | [ContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/ContextMenuCommandInteraction:Class) | N/A | The current context menu command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | [ContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/ContextMenuCommandInteraction:Class) | N/A | The current context menu command interaction object. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L157) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L157) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/MessageContextMenuCommandProps.mdx b/apps/website/docs/api-reference/types/MessageContextMenuCommandProps.mdx index 41df352..c32bde0 100644 --- a/apps/website/docs/api-reference/types/MessageContextMenuCommandProps.mdx +++ b/apps/website/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | [MessageContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/MessageContextMenuCommandInteraction:Class) | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | [MessageContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/MessageContextMenuCommandInteraction:Class) | N/A | The current command interaction object. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L174) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L174) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/ReloadOptions.mdx b/apps/website/docs/api-reference/types/ReloadOptions.mdx index 8deff0e..72c0e59 100644 --- a/apps/website/docs/api-reference/types/ReloadOptions.mdx +++ b/apps/website/docs/api-reference/types/ReloadOptions.mdx @@ -9,4 +9,4 @@ A reload type for commands. - Type: 'dev' \| 'global' \| ReloadType -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L109) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L109) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/SlashCommandProps.mdx b/apps/website/docs/api-reference/types/SlashCommandProps.mdx index 21869a1..6aa303b 100644 --- a/apps/website/docs/api-reference/types/SlashCommandProps.mdx +++ b/apps/website/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | [ChatInputCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/ChatInputCommandInteraction:Class) | N/A | The current slash (chat input) command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | [ChatInputCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/ChatInputCommandInteraction:Class) | N/A | The current slash (chat input) command interaction object. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L147) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L147) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/UserContextMenuCommandProps.mdx b/apps/website/docs/api-reference/types/UserContextMenuCommandProps.mdx index 5b381ad..e614e74 100644 --- a/apps/website/docs/api-reference/types/UserContextMenuCommandProps.mdx +++ b/apps/website/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | -| interaction | [UserContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/UserContextMenuCommandInteraction:Class) | N/A | The current command interaction object. | +| Property | Type | Value | Description | +| ----------- | ----------- | ----------- | ----------- | +| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| handler | [CommandKit](/docs/api-reference/classes/CommandKit) | N/A | The current CommandKit handler instance. | +| interaction | [UserContextMenuCommandInteraction\](https://discord.js.org/docs/packages/discord.js/main/UserContextMenuCommandInteraction:Class) | N/A | The current command interaction object. | -- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L167) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L167) \ No newline at end of file diff --git a/apps/website/docs/api-reference/types/ValidationProps.mdx b/apps/website/docs/api-reference/types/ValidationProps.mdx index ac5429a..28a593a 100644 --- a/apps/website/docs/api-reference/types/ValidationProps.mdx +++ b/apps/website/docs/api-reference/types/ValidationProps.mdx @@ -7,11 +7,12 @@ description: Props for command validation functions. Props for command validation functions. -| Property | Type | Value | Description | -| ----------- | --------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- | -| client | [Client\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | -| commandObj | CommandObject | N/A | The current (local) target command object. | -| handler | [CommandKit](/docs/api-reference/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\](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The Discord.js client object that CommandKit is handling. | +| commandObj | CommandObject | N/A | The current (local) target command object. | +| handler | [CommandKit](/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L181) + +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L181) \ No newline at end of file diff --git a/apps/website/docs/api-reference/variables/version.mdx b/apps/website/docs/api-reference/variables/version.mdx index 7af3d93..13d9645 100644 --- a/apps/website/docs/api-reference/variables/version.mdx +++ b/apps/website/docs/api-reference/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/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/index.ts#L11) +- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/index.ts#L11) \ No newline at end of file