Skip to content

Commit

Permalink
Merge pull request #65 from underctrl-io/master
Browse files Browse the repository at this point in the history
docs: fix broken links
  • Loading branch information
notunderctrl authored Feb 3, 2024
2 parents fdb2045 + 219fd84 commit 679ddf4
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
18 changes: 9 additions & 9 deletions apps/docs/pages/docs/classes/CommandKit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@

### `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.

### `commandsPath`

- 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<void>`

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`

Expand Down
10 changes: 7 additions & 3 deletions apps/docs/pages/docs/classes/components/ButtonKit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Callout } from 'nextra/components';

<Callout type="info">
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.
</Callout>

Expand Down Expand Up @@ -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`
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/typedef/AutocompleteProps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### `handler`

- Type: [`CommandKit`](/docs/typedef/CommandKit)
- Type: [`CommandKit`](/docs/classes/CommandKit)

### `interaction`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Extends `Omit<InteractionCollectorOptions<ButtonInteraction>, '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`

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/typedef/ContextMenuCommandProps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### `handler`

- Type: [`CommandKit`](/docs/typedef/CommandKit)
- Type: [`CommandKit`](/docs/classes/CommandKit)

### `interaction`

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/typedef/SlashCommandProps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### `handler`

- Type: [`CommandKit`](/typedef/CommandKit)
- Type: [`CommandKit`](/docs/classes/CommandKit)

### `interaction`

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/typedef/ValidationProps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### `handler`

- Type: [`CommandKit`](/docs/typedef/CommandKit)
- Type: [`CommandKit`](/docs/classes/CommandKit)

### `interaction`

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/guide/buttonkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/guide/commandkit-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion apps/docs/pages/guide/create-commandkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down

0 comments on commit 679ddf4

Please sign in to comment.