From bb3ad3985f5d20c528840269f0941edb1c3e5e15 Mon Sep 17 00:00:00 2001 From: Avraj Sahota Date: Sun, 4 Feb 2024 02:35:06 +0300 Subject: [PATCH] docs: fix broken links --- apps/docs/pages/docs/classes/CommandKit.mdx | 2 +- apps/docs/pages/docs/classes/components/ButtonKit.mdx | 10 +++++++--- apps/docs/pages/docs/typedef/AutocompleteProps.mdx | 2 +- ...nBuilderInteractionCollectorDispatchContextData.mdx | 2 +- .../pages/docs/typedef/ContextMenuCommandProps.mdx | 2 +- apps/docs/pages/docs/typedef/SlashCommandProps.mdx | 2 +- apps/docs/pages/docs/typedef/ValidationProps.mdx | 2 +- apps/docs/pages/guide/buttonkit.mdx | 2 +- apps/docs/pages/guide/commandkit-setup.mdx | 2 +- apps/docs/pages/guide/create-commandkit.mdx | 2 +- 10 files changed, 16 insertions(+), 12 deletions(-) diff --git a/apps/docs/pages/docs/classes/CommandKit.mdx b/apps/docs/pages/docs/classes/CommandKit.mdx index b7e094b..9f7eb3a 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. 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).