diff --git a/apps/docs/pages/docs/classes/CommandKit.mdx b/apps/docs/pages/docs/classes/CommandKit.mdx index b7e094b..717f46f 100644 --- a/apps/docs/pages/docs/classes/CommandKit.mdx +++ b/apps/docs/pages/docs/classes/CommandKit.mdx @@ -2,7 +2,7 @@ ### `commands` -- Type: [`CommandObject[]`](/typedef/CommandObject) +- Type: [`CommandObject[]`](/docs/typedef/CommandObject) An array of all the command objects that CommandKit is handling. This includes all the properties and methods that are also set outside of CommandKit's configuration. It does however not include the `run` method since CommandKit handles that internally. @@ -10,44 +10,44 @@ An array of all the command objects that CommandKit is handling. This includes a - Type: `string` | `undefined` -The path to the commands directory which was set when [instantiating CommandKit](/docs/commandkit-setup). +The path to the commands directory which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `eventsPath` - Type: `string` | `undefined` -The path to the events directory which was set when [instantiating CommandKit](/docs/commandkit-setup). +The path to the events directory which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `validationsPath` - Type: `string` | `undefined` -The path to the validations directory which was set when [instantiating CommandKit](/docs/commandkit-setup). +The path to the validations directory which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `devUserIds` - Type: `string[]` -The array of developer user IDs which was set when [instantiating CommandKit](/docs/commandkit-setup). +The array of developer user IDs which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `devGuildIds` - Type: `string[]` -The array of development server IDs which was set when [instantiating CommandKit](/docs/commandkit-setup). +The array of development server IDs which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `devRoleIds` - Type: `string[]` -The array of developer role IDs which was set when [instantiating CommandKit](/docs/commandkit-setup). +The array of developer role IDs which was set when [instantiating CommandKit](/guide/commandkit-setup). ### `reloadCommands` -- Props type: `'dev'` | `'global'` | [`ReloadType`](/enums/ReloadType) (optional) +- Props type: `'dev'` | `'global'` | [`ReloadType`](/docs/enums/ReloadType) (optional) - Return type: `Promise` -Reloads application commands. Using "dev" will only reload commands marked with `devOnly`, and using "global" will do the opposite. Not passing in a property will reload both dev and global commands. The reload behaviour depends on [`bulkRegister`](/docs/commandkit-setup#bulkregister-optional). +Reloads application commands. Using "dev" will only reload commands marked with `devOnly`, and using "global" will do the opposite. Not passing in a property will reload both dev and global commands. The reload behaviour depends on [`bulkRegister`](/guide/commandkit-setup#bulkregister-optional). ### `reloadEvents` diff --git a/apps/docs/pages/docs/classes/components/ButtonKit.mdx b/apps/docs/pages/docs/classes/components/ButtonKit.mdx index d0a7951..4f626c6 100644 --- a/apps/docs/pages/docs/classes/components/ButtonKit.mdx +++ b/apps/docs/pages/docs/classes/components/ButtonKit.mdx @@ -4,7 +4,7 @@ import { Callout } from 'nextra/components'; ButtonKit extends the - [ButtonBuilder](https://discord.js.org/docs/packages/discord.js/main/ButtonBuilder:Class) + [`ButtonBuilder`](https://discord.js.org/docs/packages/discord.js/main/ButtonBuilder:Class) class, provided by discord.js. @@ -40,10 +40,14 @@ button.onClick( ); // Remove onClick handler and destroy the interaction collector -button.onClick(null); +button.dispose(); ``` -### onEnd +### `onEnd` - Return type: `ButtonKit` - Props type: [`CommandKitButtonBuilderOnEnd`](/docs/typedef/CommandKitButtonBuilderOnEnd) + +### `dispose` + +- Return type: `void` diff --git a/apps/docs/pages/docs/typedef/AutocompleteProps.mdx b/apps/docs/pages/docs/typedef/AutocompleteProps.mdx index b41648d..ececdf2 100644 --- a/apps/docs/pages/docs/typedef/AutocompleteProps.mdx +++ b/apps/docs/pages/docs/typedef/AutocompleteProps.mdx @@ -6,7 +6,7 @@ ### `handler` -- Type: [`CommandKit`](/docs/typedef/CommandKit) +- Type: [`CommandKit`](/docs/classes/CommandKit) ### `interaction` diff --git a/apps/docs/pages/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/docs/pages/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx index 1cd46c4..cff5b47 100644 --- a/apps/docs/pages/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx +++ b/apps/docs/pages/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx @@ -6,7 +6,7 @@ Extends `Omit, 'filter' | 'compon The message to listen for button interactions on. -- Type: [Message](https://discord.js.org/docs/packages/discord.js/main/Message:Class) +- Type: [`Message`](https://discord.js.org/docs/packages/discord.js/main/Message:Class) ### `time` diff --git a/apps/docs/pages/docs/typedef/ContextMenuCommandProps.mdx b/apps/docs/pages/docs/typedef/ContextMenuCommandProps.mdx index 06fbfaa..55c67e9 100644 --- a/apps/docs/pages/docs/typedef/ContextMenuCommandProps.mdx +++ b/apps/docs/pages/docs/typedef/ContextMenuCommandProps.mdx @@ -6,7 +6,7 @@ ### `handler` -- Type: [`CommandKit`](/docs/typedef/CommandKit) +- Type: [`CommandKit`](/docs/classes/CommandKit) ### `interaction` diff --git a/apps/docs/pages/docs/typedef/SlashCommandProps.mdx b/apps/docs/pages/docs/typedef/SlashCommandProps.mdx index 80565c0..4c9488d 100644 --- a/apps/docs/pages/docs/typedef/SlashCommandProps.mdx +++ b/apps/docs/pages/docs/typedef/SlashCommandProps.mdx @@ -6,7 +6,7 @@ ### `handler` -- Type: [`CommandKit`](/typedef/CommandKit) +- Type: [`CommandKit`](/docs/classes/CommandKit) ### `interaction` diff --git a/apps/docs/pages/docs/typedef/ValidationProps.mdx b/apps/docs/pages/docs/typedef/ValidationProps.mdx index 8840393..809774d 100644 --- a/apps/docs/pages/docs/typedef/ValidationProps.mdx +++ b/apps/docs/pages/docs/typedef/ValidationProps.mdx @@ -10,7 +10,7 @@ ### `handler` -- Type: [`CommandKit`](/docs/typedef/CommandKit) +- Type: [`CommandKit`](/docs/classes/CommandKit) ### `interaction` diff --git a/apps/docs/pages/guide/buttonkit.mdx b/apps/docs/pages/guide/buttonkit.mdx index e54217b..267c9f9 100644 --- a/apps/docs/pages/guide/buttonkit.mdx +++ b/apps/docs/pages/guide/buttonkit.mdx @@ -174,7 +174,7 @@ Whether or not the collector should automatically reset the timer when a button ## Handle collector end -When setting up an `onClick()` method using ButtonKit, you may also want to run some code after the collector ends running. The default timeout is 1 day, but you can modify this in [onClickOptions#time](/guide/buttonkit#time-optional). To handle when the collector ends, you can setup an `onEnd()` method like this: +When setting up an `onClick()` method using ButtonKit, you may also want to run some code after the collector ends running. The default timeout is 1 day, but you can modify this in [`onClickOptions#time`](/guide/buttonkit#time-optional). To handle when the collector ends, you can setup an `onEnd()` method like this: ```js copy {16-21} const myButton = new ButtonKit() diff --git a/apps/docs/pages/guide/commandkit-setup.mdx b/apps/docs/pages/guide/commandkit-setup.mdx index 453e25f..2863075 100644 --- a/apps/docs/pages/guide/commandkit-setup.mdx +++ b/apps/docs/pages/guide/commandkit-setup.mdx @@ -165,4 +165,4 @@ This is used to disable CommandKit's built-in validation functions. Setting this - Type: `boolean` - Default: `false` -This is used to change the behaviour of how CommandKit loads application commands. By default it's one-by-one while comparing changes. Setting this option to `true` will load application commands all at once on every restart, and when [`reloadCommands()`](/docs/typedef/CommandKit#reloadcommands) is called. +This is used to change the behaviour of how CommandKit loads application commands. By default it's one-by-one while comparing changes. Setting this option to `true` will load application commands all at once on every restart, and when [`reloadCommands()`](/docs/classes/CommandKit#reloadcommands) is called. diff --git a/apps/docs/pages/guide/create-commandkit.mdx b/apps/docs/pages/guide/create-commandkit.mdx index d693368..4ed5c85 100644 --- a/apps/docs/pages/guide/create-commandkit.mdx +++ b/apps/docs/pages/guide/create-commandkit.mdx @@ -34,7 +34,7 @@ When running create-commandkit, you should be asked the following questions: - **Package Manager:** Lets you choose which package manager to use — npm, pnpm, or Yarn. -- **Language ([Development version](/guide/installation#development-version) only):** The language to use for your project — JavaScript or TypeScript. +- **Language ([Development version](/guide/create-commandkit#development-version) only):** The language to use for your project — JavaScript or TypeScript. - **Module Type:** Allows you to pick between CommonJS (using require and module.exports), and ESM (using import and export).