From fe9b9d88f8541b4758cc813e8505d26748e6e5bd Mon Sep 17 00:00:00 2001
From: twlite <46562212+twlite@users.noreply.github.com>
Date: Sat, 14 Dec 2024 23:21:43 +0545
Subject: [PATCH] feat: add automatic docgen
---
apps/docs/app/(home)/page.tsx | 2 +-
apps/docs/app/layout.config.tsx | 2 +-
apps/docs/content/docs/classes/ButtonKit.mdx | 136 ++++++++++++++++
apps/docs/content/docs/classes/CommandKit.mdx | 83 ++++++----
.../docs/classes/components/ButtonKit.mdx | 56 -------
apps/docs/content/docs/classes/index.mdx | 10 ++
apps/docs/content/docs/enums/ReloadType.mdx | 15 +-
apps/docs/content/docs/enums/index.mdx | 14 ++
.../content/docs/functions/defineConfig.mdx | 12 ++
.../docs/content/docs/functions/getConfig.mdx | 8 +
apps/docs/content/docs/functions/index.mdx | 10 ++
apps/docs/content/docs/index.mdx | 145 ++++++++++++++++++
.../docs/typedef/AutocompleteProps.mdx | 18 ---
.../docs/content/docs/typedef/CommandData.mdx | 8 -
...tonBuilderInteractionCollectorDispatch.mdx | 12 --
...nteractionCollectorDispatchContextData.mdx | 26 ----
.../typedef/CommandKitButtonBuilderOnEnd.mdx | 8 -
.../content/docs/typedef/CommandObject.mdx | 22 ---
.../content/docs/typedef/CommandOptions.mdx | 30 ----
.../docs/typedef/ContextMenuCommandProps.mdx | 18 ---
.../docs/typedef/SlashCommandProps.mdx | 18 ---
.../content/docs/typedef/ValidationProps.mdx | 22 ---
.../content/docs/types/AutocompleteProps.mdx | 16 ++
.../content/docs/types/CommandContext.mdx | 16 ++
apps/docs/content/docs/types/CommandData.mdx | 10 ++
.../content/docs/types/CommandFileObject.mdx | 19 +++
...tonBuilderInteractionCollectorDispatch.mdx | 15 ++
...nteractionCollectorDispatchContextData.mdx | 14 ++
.../types/CommandKitButtonBuilderOnEnd.mdx | 12 ++
.../content/docs/types/CommandKitConfig.mdx | 22 +++
.../content/docs/types/CommandKitData.mdx | 26 ++++
.../content/docs/types/CommandKitOptions.mdx | 23 +++
.../docs/content/docs/types/CommandObject.mdx | 15 ++
.../content/docs/types/CommandOptions.mdx | 18 +++
apps/docs/content/docs/types/CommandProps.mdx | 16 ++
.../docs/types/ContextMenuCommandProps.mdx | 16 ++
.../types/MessageContextMenuCommandProps.mdx | 16 ++
.../docs/content/docs/types/ReloadOptions.mdx | 12 ++
.../content/docs/types/SlashCommandProps.mdx | 16 ++
.../types/UserContextMenuCommandProps.mdx | 16 ++
.../content/docs/types/ValidationProps.mdx | 17 ++
apps/docs/content/docs/types/index.mdx | 113 ++++++++++++++
apps/docs/content/docs/variables/index.mdx | 14 ++
apps/docs/content/docs/variables/version.mdx | 12 ++
package.json | 4 +
pnpm-lock.yaml | 106 +++++++++++++
scripts/docgen.ts | 135 ++++++++++++++++
47 files changed, 1093 insertions(+), 281 deletions(-)
create mode 100644 apps/docs/content/docs/classes/ButtonKit.mdx
delete mode 100644 apps/docs/content/docs/classes/components/ButtonKit.mdx
create mode 100644 apps/docs/content/docs/classes/index.mdx
create mode 100644 apps/docs/content/docs/enums/index.mdx
create mode 100644 apps/docs/content/docs/functions/defineConfig.mdx
create mode 100644 apps/docs/content/docs/functions/getConfig.mdx
create mode 100644 apps/docs/content/docs/functions/index.mdx
create mode 100644 apps/docs/content/docs/index.mdx
delete mode 100644 apps/docs/content/docs/typedef/AutocompleteProps.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandData.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandKitButtonBuilderOnEnd.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandObject.mdx
delete mode 100644 apps/docs/content/docs/typedef/CommandOptions.mdx
delete mode 100644 apps/docs/content/docs/typedef/ContextMenuCommandProps.mdx
delete mode 100644 apps/docs/content/docs/typedef/SlashCommandProps.mdx
delete mode 100644 apps/docs/content/docs/typedef/ValidationProps.mdx
create mode 100644 apps/docs/content/docs/types/AutocompleteProps.mdx
create mode 100644 apps/docs/content/docs/types/CommandContext.mdx
create mode 100644 apps/docs/content/docs/types/CommandData.mdx
create mode 100644 apps/docs/content/docs/types/CommandFileObject.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitConfig.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitData.mdx
create mode 100644 apps/docs/content/docs/types/CommandKitOptions.mdx
create mode 100644 apps/docs/content/docs/types/CommandObject.mdx
create mode 100644 apps/docs/content/docs/types/CommandOptions.mdx
create mode 100644 apps/docs/content/docs/types/CommandProps.mdx
create mode 100644 apps/docs/content/docs/types/ContextMenuCommandProps.mdx
create mode 100644 apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx
create mode 100644 apps/docs/content/docs/types/ReloadOptions.mdx
create mode 100644 apps/docs/content/docs/types/SlashCommandProps.mdx
create mode 100644 apps/docs/content/docs/types/UserContextMenuCommandProps.mdx
create mode 100644 apps/docs/content/docs/types/ValidationProps.mdx
create mode 100644 apps/docs/content/docs/types/index.mdx
create mode 100644 apps/docs/content/docs/variables/index.mdx
create mode 100644 apps/docs/content/docs/variables/version.mdx
create mode 100644 scripts/docgen.ts
diff --git a/apps/docs/app/(home)/page.tsx b/apps/docs/app/(home)/page.tsx
index 3ab192f..47329e3 100644
--- a/apps/docs/app/(home)/page.tsx
+++ b/apps/docs/app/(home)/page.tsx
@@ -80,7 +80,7 @@ export default function HomePage() {
Guide
Docs
diff --git a/apps/docs/app/layout.config.tsx b/apps/docs/app/layout.config.tsx
index 3e56723..97647d9 100644
--- a/apps/docs/app/layout.config.tsx
+++ b/apps/docs/app/layout.config.tsx
@@ -19,7 +19,7 @@ export const baseOptions: BaseLayoutProps = {
},
{
text: 'Documentation',
- url: '/docs/typedef/AutocompleteProps',
+ url: '/docs',
active: 'nested-url',
},
{
diff --git a/apps/docs/content/docs/classes/ButtonKit.mdx b/apps/docs/content/docs/classes/ButtonKit.mdx
new file mode 100644
index 0000000..abad407
--- /dev/null
+++ b/apps/docs/content/docs/classes/ButtonKit.mdx
@@ -0,0 +1,136 @@
+---
+title: ButtonKit
+description: No description provided
+---
+
+## ButtonKit extends ButtonBuilder
+
+```typescript
+ButtonKit(data);
+```
+
+| Parameter | Type | Optional |
+| --------- | ------------------------------------------------------------- | -------- |
+| data | Partial\ \| Partial\ | ✅ |
+
+## Properties
+
+### public data: any
+
+The API data associated with this component.
+
+## Methods
+
+### public dispose(): ButtonKit
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L165)
+
+### 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.
+
+```ts
+const button = new ButtonKit()
+ .setLabel('Click me')
+ .setStyle(ButtonStyle.Primary)
+ .setCustomId('click_me');
+
+const row = new ActionRowBuilder().addComponents(button);
+
+const message = await channel.send({
+ content: 'Click the button',
+ components: [row],
+});
+
+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 |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L74)
+
+### public onEnd(handler): this
+
+| Parameter | Type | Optional |
+| --------- | ---------------------------- | -------- |
+| handler | CommandKitButtonBuilderOnEnd | ❌ |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/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
+
+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
+
+Sets the emoji to display on this button.
+
+| Parameter | Type | Optional | Description |
+| --------- | ------------------------ | -------- | ---------------- |
+| emoji | ComponentEmojiResolvable | ❌ | The emoji to use |
+
+### public setLabel(label): this
+
+Sets the label for this button.
+
+| Parameter | Type | Optional | Description |
+| --------- | ------------------------------------------------------------------------------------------------- | -------- | ---------------- |
+| label | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The label to use |
+
+### public setSKUId(skuId): this
+
+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
+
+Sets the style of this button.
+
+| Parameter | Type | Optional | Description |
+| --------- | ----------- | -------- | ---------------- |
+| style | ButtonStyle | ❌ | The style to use |
+
+### public setURL(url): this
+
+Sets the URL for this button.
+
+| Parameter | Type | Optional | Description |
+| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------- |
+| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | ❌ | The URL to use |
+
+### public toJSON(): APIButtonComponent
+
+ComponentBuilder.toJSON
+
+### public static from(other): ButtonBuilder
+
+| Parameter | Type | Optional |
+| --------- | ------------------ | ---------------------------------- | --- |
+| other | APIButtonComponent | JSONEncodable\ | ❌ |
diff --git a/apps/docs/content/docs/classes/CommandKit.mdx b/apps/docs/content/docs/classes/CommandKit.mdx
index 3f743c8..00f3fb6 100644
--- a/apps/docs/content/docs/classes/CommandKit.mdx
+++ b/apps/docs/content/docs/classes/CommandKit.mdx
@@ -1,67 +1,84 @@
---
title: CommandKit
-description: CommandKit is a command handler for Discord.js that makes it easy to create and manage commands, events, and validations.
+description: No description provided
---
-# CommandKit
+## CommandKit
-### `commands`
+```typescript
+CommandKit(options);
+```
-- Type: [`CommandObject[]`](/docs/typedef/CommandObject)
+| Parameter | Type | Optional | Description |
+| --------- | ----------------- | -------- | ------------------------------------- |
+| options | CommandKitOptions | ❌ | The default CommandKit configuration. |
-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.
+## Properties
-### `commandsPath`
+### public static \_instance: any
-- Type: `string` | `undefined`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L8)
-The path to the commands directory which was set when [instantiating CommandKit](/guide/commandkit-setup).
+### public client: any
-### `eventsPath`
+Get the client attached to this CommandKit instance.
-- Type: `string` | `undefined`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L38)
-The path to the events directory which was set when [instantiating CommandKit](/guide/commandkit-setup).
+### public commandHandler: any
-### `validationsPath`
+Get command handler instance.
-- Type: `string` | `undefined`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L45)
-The path to the validations directory which was set when [instantiating CommandKit](/guide/commandkit-setup).
+### public commands: any
-### `devUserIds`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L125)
-- Type: `string[]`
+### public commandsPath: any
-The array of developer user IDs which was set when [instantiating CommandKit](/guide/commandkit-setup).
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L141)
-### `devGuildIds`
+### public devGuildIds: any
-- Type: `string[]`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L169)
-The array of development server IDs which was set when [instantiating CommandKit](/guide/commandkit-setup).
+### public devRoleIds: any
-### `devRoleIds`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L176)
-- Type: `string[]`
+### public devUserIds: any
-The array of developer role IDs which was set when [instantiating CommandKit](/guide/commandkit-setup).
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L162)
-### `reloadCommands`
+### public eventsPath: any
-- Props type: `'dev'` | `'global'` | [`ReloadType`](/docs/enums/ReloadType) (optional)
-- Return type: `Promise`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L148)
-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).
+### public validationsPath: any
-### `reloadEvents`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L155)
-- Return type: `Promise`
+## Methods
-Resets and reloads application events.
+### 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)>
-### `reloadValidations`
+Updates application commands with the latest from "commandsPath".
-- Return type: `Promise`
+| Parameter | Type | Optional |
+| --------- | ------------- | -------- |
+| type | ReloadOptions | ✅ |
-Reloads application commands validations.
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L101)
+
+### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
+
+Updates application events with the latest from "eventsPath".
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L109)
+
+### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
+
+Updates application command validations with the latest from "validationsPath".
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/CommandKit.ts#L117)
diff --git a/apps/docs/content/docs/classes/components/ButtonKit.mdx b/apps/docs/content/docs/classes/components/ButtonKit.mdx
deleted file mode 100644
index eb5efd5..0000000
--- a/apps/docs/content/docs/classes/components/ButtonKit.mdx
+++ /dev/null
@@ -1,56 +0,0 @@
----
-title: ButtonKit
-description: ButtonKit extends the ButtonBuilder class, provided by discord.js.
----
-
-# ButtonKit
-
-
- ButtonKit extends the
- [`ButtonBuilder`](https://discord.js.org/docs/packages/discord.js/main/ButtonBuilder:Class)
- class, provided by discord.js.
-
-
-### `onClick`
-
-- Return type: `ButtonKit`
-- Arguments:
- - handler: [`CommandKitButtonBuilderInteractionCollectorDispatch`](/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch)
- - data?: [`CommandKitButtonBuilderInteractionCollectorDispatchContextData`](/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch) | `undefined`
-
-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.
-
-#### Example
-
-```ts
-const button = new ButtonKit()
- .setLabel('Click me')
- .setStyle(ButtonStyle.Primary)
- .setCustomId('click_me');
-
-const row = new ActionRowBuilder().addComponents(button);
-
-const message = await channel.send({
- content: 'Click the button',
- components: [row],
-});
-
-button.onClick(
- async (interaction) => {
- await interaction.reply('You clicked me!');
- },
- { message },
-);
-
-// Remove onClick handler and destroy the interaction collector
-button.dispose();
-```
-
-### `onEnd`
-
-- Return type: `ButtonKit`
-- Props type: [`CommandKitButtonBuilderOnEnd`](/docs/typedef/CommandKitButtonBuilderOnEnd)
-
-### `dispose`
-
-- Return type: `void`
diff --git a/apps/docs/content/docs/classes/index.mdx b/apps/docs/content/docs/classes/index.mdx
new file mode 100644
index 0000000..b29cf95
--- /dev/null
+++ b/apps/docs/content/docs/classes/index.mdx
@@ -0,0 +1,10 @@
+---
+title: Classes
+description: Classes provided by CommandKit
+---
+
+# Classes
+
+
+
+
diff --git a/apps/docs/content/docs/enums/ReloadType.mdx b/apps/docs/content/docs/enums/ReloadType.mdx
index 00d7fd3..e287646 100644
--- a/apps/docs/content/docs/enums/ReloadType.mdx
+++ b/apps/docs/content/docs/enums/ReloadType.mdx
@@ -1,14 +1,13 @@
---
title: ReloadType
-description: The type of reload to perform when reloading commands or events.
+description: No description provided
---
-# ReloadType
+## ReloadType
-### Developer
+| Property | Type | Value | Description |
+| --------- | -------- | ----- | -------------------------------- |
+| Developer | 'dev' | N/A | Reload developer/guild commands. |
+| Global | 'global' | N/A | Reload global commands. |
-- Value: `dev`
-
-### Global
-
-- Value: `global`
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L284)
diff --git a/apps/docs/content/docs/enums/index.mdx b/apps/docs/content/docs/enums/index.mdx
new file mode 100644
index 0000000..bdb7cb2
--- /dev/null
+++ b/apps/docs/content/docs/enums/index.mdx
@@ -0,0 +1,14 @@
+---
+title: Enums
+description: Enums provided by CommandKit
+---
+
+# Enums
+
+
+
+
diff --git a/apps/docs/content/docs/functions/defineConfig.mdx b/apps/docs/content/docs/functions/defineConfig.mdx
new file mode 100644
index 0000000..9026c1b
--- /dev/null
+++ b/apps/docs/content/docs/functions/defineConfig.mdx
@@ -0,0 +1,12 @@
+---
+title: defineConfig
+description: No description provided
+---
+
+### defineConfig(config): Partial\<[CommandKitConfig](/docs/types/CommandKitConfig.mdx)>
+
+| Parameter | Type | Optional |
+| --------- | -------------------------------------------------------------------- | -------- |
+| config | PartialConfig\<[CommandKitConfig](/docs/types/CommandKitConfig.mdx)> | ❌ |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L71)
diff --git a/apps/docs/content/docs/functions/getConfig.mdx b/apps/docs/content/docs/functions/getConfig.mdx
new file mode 100644
index 0000000..e86a81f
--- /dev/null
+++ b/apps/docs/content/docs/functions/getConfig.mdx
@@ -0,0 +1,8 @@
+---
+title: getConfig
+description: No description provided
+---
+
+### getConfig(): [CommandKitConfig](/docs/types/CommandKitConfig.mdx)
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L60)
diff --git a/apps/docs/content/docs/functions/index.mdx b/apps/docs/content/docs/functions/index.mdx
new file mode 100644
index 0000000..97cfcc0
--- /dev/null
+++ b/apps/docs/content/docs/functions/index.mdx
@@ -0,0 +1,10 @@
+---
+title: Functions
+description: Functions provided by CommandKit
+---
+
+# Functions
+
+
+
+
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
new file mode 100644
index 0000000..2a98411
--- /dev/null
+++ b/apps/docs/content/docs/index.mdx
@@ -0,0 +1,145 @@
+---
+title: commandkit
+description: Beginner friendly command & event handler for Discord.js
+---
+
+# Classes
+
+
+
+
+
+# Types
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Functions
+
+
+
+
+
+# Variables
+
+
+
+
+
+# Enums
+
+
+
+
diff --git a/apps/docs/content/docs/typedef/AutocompleteProps.mdx b/apps/docs/content/docs/typedef/AutocompleteProps.mdx
deleted file mode 100644
index 7dbb3c9..0000000
--- a/apps/docs/content/docs/typedef/AutocompleteProps.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: AutocompleteProps
-description: The properties available to the Autocomplete component.
----
-
-# AutocompleteProps
-
-### `client`
-
-- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
-
-### `handler`
-
-- Type: [`CommandKit`](/docs/classes/CommandKit)
-
-### `interaction`
-
-- Type [`AutocompleteInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/AutocompleteInteraction)
diff --git a/apps/docs/content/docs/typedef/CommandData.mdx b/apps/docs/content/docs/typedef/CommandData.mdx
deleted file mode 100644
index 8be17de..0000000
--- a/apps/docs/content/docs/typedef/CommandData.mdx
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: CommandData
-description: The data required to create a new command.
----
-
-# CommandData
-
-Type: [`RESTPostAPIApplicationCommandsJSONBody`](https://discord-api-types.dev/api/discord-api-types-v10#RESTPostAPIApplicationCommandsJSONBody)
diff --git a/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch.mdx b/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
deleted file mode 100644
index d1939a0..0000000
--- a/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: CommandKitButtonBuilderInteractionCollectorDispatch
-description: The function signature for the interaction collector dispatch function.
----
-
-# CommandKitButtonBuilderInteractionCollectorDispatch
-
-- Type: `(interaction: ButtonInteraction) => Awaitable;`
-
-## References
-
-- [`ButtonInteraction`](https://discord.js.org/docs/packages/discord.js/main/ButtonInteraction:Class)
diff --git a/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
deleted file mode 100644
index cc34c13..0000000
--- a/apps/docs/content/docs/typedef/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title: CommandKitButtonBuilderInteractionCollectorDispatchContextData
-description: The context data required to dispatch a button interaction collector.
----
-
-# CommandKitButtonBuilderInteractionCollectorDispatchContextData
-
-Extends `Omit, 'filter' | 'componentType'>`
-
-### `message`
-
-The message to listen for button interactions on.
-
-- Type: [`Message`](https://discord.js.org/docs/packages/discord.js/main/Message:Class)
-
-### `time`
-
-The duration (in ms) that the collector should run for.
-
-- Type: `number` | `undefined`
-
-### `autoReset`
-
-If the collector should automatically reset the timer when a button is clicked.
-
-- Type: `boolean` | `undefined`
diff --git a/apps/docs/content/docs/typedef/CommandKitButtonBuilderOnEnd.mdx b/apps/docs/content/docs/typedef/CommandKitButtonBuilderOnEnd.mdx
deleted file mode 100644
index cba6ec8..0000000
--- a/apps/docs/content/docs/typedef/CommandKitButtonBuilderOnEnd.mdx
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: CommandKitButtonBuilderOnEnd
-description: The function signature for the onEnd function of the CommandKitButtonBuilder.
----
-
-# CommandKitButtonBuilderOnEnd
-
-- Type: `() => Awaitable`
diff --git a/apps/docs/content/docs/typedef/CommandObject.mdx b/apps/docs/content/docs/typedef/CommandObject.mdx
deleted file mode 100644
index dc54474..0000000
--- a/apps/docs/content/docs/typedef/CommandObject.mdx
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: CommandObject
-description: The object representing a command.
----
-
-# CommandObject
-
-### `data`
-
-- Type: [`CommandData`](/docs/typedef/CommandData)
-
-### `options` (optional)
-
-- Type: [`CommandOptions`](/docs/typedef/CommandOptions)
-
-### `filePath`
-
-- Type: `string`
-
-### `category`
-
-- Type: `string` | `null`
diff --git a/apps/docs/content/docs/typedef/CommandOptions.mdx b/apps/docs/content/docs/typedef/CommandOptions.mdx
deleted file mode 100644
index ee2d2ee..0000000
--- a/apps/docs/content/docs/typedef/CommandOptions.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: CommandOptions
-description: The options for a command.
----
-
-# CommandOptions
-
-### `devOnly` (optional)
-
-- Type: `boolean`
-
-This determines whether the command should only be registered in development guilds and be executed by the bot developers.
-
-### `userPermissions` (optional)
-
-- Type: [`PermissionsString[]`](https://discord.js.org/docs/packages/discord.js/main/PermissionsString:TypeAlias)
-
-This determines whether the user has the required permissions to execute the command. This is checked against the user's permissions in the guild where the command was executed (if any).
-
-### `botPermissions` (optional)
-
-- Type: [`PermissionsString[]`](https://discord.js.org/docs/packages/discord.js/main/PermissionsString:TypeAlias)
-
-This determines whether the bot has the required permissions to execute the command. This is checked against the bot's permissions in the guild where the command was executed (if any).
-
-### `deleted` (optional)
-
-- Type: `boolean`
-
-This determines whether the command should be deleted on the next reload.
diff --git a/apps/docs/content/docs/typedef/ContextMenuCommandProps.mdx b/apps/docs/content/docs/typedef/ContextMenuCommandProps.mdx
deleted file mode 100644
index 8089bc1..0000000
--- a/apps/docs/content/docs/typedef/ContextMenuCommandProps.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: ContextMenuCommandProps
-description: The props for the ContextMenuCommand component.
----
-
-# ContextMenuCommandProps
-
-### `client`
-
-- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
-
-### `handler`
-
-- Type: [`CommandKit`](/docs/classes/CommandKit)
-
-### `interaction`
-
-- Type [`ContextMenuCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ContextMenuCommandInteraction)
diff --git a/apps/docs/content/docs/typedef/SlashCommandProps.mdx b/apps/docs/content/docs/typedef/SlashCommandProps.mdx
deleted file mode 100644
index d032eab..0000000
--- a/apps/docs/content/docs/typedef/SlashCommandProps.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: SlashCommandProps
-description: The props for the SlashCommand component.
----
-
-# SlashCommandProps
-
-### `client`
-
-- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
-
-### `handler`
-
-- Type: [`CommandKit`](/docs/classes/CommandKit)
-
-### `interaction`
-
-- Type [`ChatInputCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ChatInputCommandInteraction)
diff --git a/apps/docs/content/docs/typedef/ValidationProps.mdx b/apps/docs/content/docs/typedef/ValidationProps.mdx
deleted file mode 100644
index e5d57dc..0000000
--- a/apps/docs/content/docs/typedef/ValidationProps.mdx
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: ValidationProps
-description: The props for the validation function of a command.
----
-
-# ValidationProps
-
-### `client`
-
-- Type: [`Client`](https://old.discordjs.dev/#/docs/discord.js/main/class/Client)
-
-### `commandObj`
-
-- Type: [`CommandObject`](/docs/typedef/CommandObject)
-
-### `handler`
-
-- Type: [`CommandKit`](/docs/classes/CommandKit)
-
-### `interaction`
-
-- Type: [`ChatInputCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ChatInputCommandInteraction) | [`ContextMenuCommandInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/ContextMenuCommandInteraction) | [`AutocompleteInteraction`](https://old.discordjs.dev/#/docs/discord.js/main/class/AutocompleteInteraction)
diff --git a/apps/docs/content/docs/types/AutocompleteProps.mdx b/apps/docs/content/docs/types/AutocompleteProps.mdx
new file mode 100644
index 0000000..8d9d90e
--- /dev/null
+++ b/apps/docs/content/docs/types/AutocompleteProps.mdx
@@ -0,0 +1,16 @@
+---
+title: AutocompleteProps
+description: Props for autocomplete command run functions.
+---
+
+## AutocompleteProps
+
+Props for autocomplete command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | ------------------------------------------ | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | AutocompleteInteraction\ | N/A | The current autocomplete command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L146)
diff --git a/apps/docs/content/docs/types/CommandContext.mdx b/apps/docs/content/docs/types/CommandContext.mdx
new file mode 100644
index 0000000..bd52f4a
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandContext.mdx
@@ -0,0 +1,16 @@
+---
+title: CommandContext
+description: Represents a command context.
+---
+
+## CommandContext
+
+Represents a command context.
+
+| Property | Type | Value | Description |
+| ----------- | ------------------------------------------ | ----- | -------------------------------------------- |
+| client | Client\ | N/A | The client that instantiated this command. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The command data. |
+| interaction | Interaction\ | N/A | The interaction that triggered this command. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L80)
diff --git a/apps/docs/content/docs/types/CommandData.mdx b/apps/docs/content/docs/types/CommandData.mdx
new file mode 100644
index 0000000..ad1ddd9
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandData.mdx
@@ -0,0 +1,10 @@
+---
+title: CommandData
+description: No description provided
+---
+
+## CommandData
+
+- Type: RESTPostAPIApplicationCommandsJSONBody
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L256)
diff --git a/apps/docs/content/docs/types/CommandFileObject.mdx b/apps/docs/content/docs/types/CommandFileObject.mdx
new file mode 100644
index 0000000..e0d8d52
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandFileObject.mdx
@@ -0,0 +1,19 @@
+---
+title: CommandFileObject
+description: Represents a command file.
+---
+
+## CommandFileObject
+
+Represents a command file.
+
+| Property | Type | Value |
+| ------------ | ------------------------------------------------------------------------------------------------- | ----- |
+| autocomplete | ( ctx: CommandContext\ ) => void | N/A |
+| category | null \| string | N/A |
+| data | RESTPostAPIApplicationCommandsJSONBody | N/A |
+| filePath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A |
+| options | CommandOptions | N/A |
+| run | ( ctx: CommandContext\ ) => void | N/A |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L101)
diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
new file mode 100644
index 0000000..05ee2c9
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatch.mdx
@@ -0,0 +1,15 @@
+---
+title: CommandKitButtonBuilderInteractionCollectorDispatch
+description: The handler to run when a button is clicked. This handler is called with the interaction as the first argument. If the first argument is null, it means that the interaction collector has been destroyed.
+---
+
+## CommandKitButtonBuilderInteractionCollectorDispatch
+
+The handler to run when a button is clicked. This handler is called with the interaction as the first argument.
+If the first argument is null, it means that the interaction collector has been destroyed.
+
+- Type: (
+ interaction: ButtonInteraction
+ ) => Awaitable\
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L17)
diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
new file mode 100644
index 0000000..a51702b
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitButtonBuilderInteractionCollectorDispatchContextData.mdx
@@ -0,0 +1,14 @@
+---
+title: CommandKitButtonBuilderInteractionCollectorDispatchContextData
+description: No description provided
+---
+
+## CommandKitButtonBuilderInteractionCollectorDispatchContextData
+
+- Type: \{
+ autoReset: boolean,
+ message: Message,
+ time: number
+ } & Omit\, 'filter' \| 'componentType'>
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L23)
diff --git a/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx b/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx
new file mode 100644
index 0000000..6306ecf
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitButtonBuilderOnEnd.mdx
@@ -0,0 +1,12 @@
+---
+title: CommandKitButtonBuilderOnEnd
+description: No description provided
+---
+
+## CommandKitButtonBuilderOnEnd
+
+- Type: (
+ ...args: unknown\[]
+ ) => Awaitable\
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/components/ButtonKit.ts#L21)
diff --git a/apps/docs/content/docs/types/CommandKitConfig.mdx b/apps/docs/content/docs/types/CommandKitConfig.mdx
new file mode 100644
index 0000000..0a5cd71
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitConfig.mdx
@@ -0,0 +1,22 @@
+---
+title: CommandKitConfig
+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`. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/config.ts#L1)
diff --git a/apps/docs/content/docs/types/CommandKitData.mdx b/apps/docs/content/docs/types/CommandKitData.mdx
new file mode 100644
index 0000000..c1fb5a7
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitData.mdx
@@ -0,0 +1,26 @@
+---
+title: CommandKitData
+description: Private data for the CommandKit class.
+---
+
+## CommandKitData
+
+Private data for the CommandKit class.
+
+| Property | Type | Value | Description |
+| ---------------------- | --------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------- |
+| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. |
+| client | Client\ | N/A | The Discord.js client object to use with CommandKit. |
+| commandHandler | CommandHandler | N/A | N/A |
+| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. |
+| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. |
+| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. |
+| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. |
+| eventHandler | EventHandler | N/A | N/A |
+| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. |
+| experimental | \{ hooks: boolean } | N/A | Options for experimental features. |
+| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). |
+| validationHandler | ValidationHandler | N/A | N/A |
+| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L71)
diff --git a/apps/docs/content/docs/types/CommandKitOptions.mdx b/apps/docs/content/docs/types/CommandKitOptions.mdx
new file mode 100644
index 0000000..91b6c7d
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandKitOptions.mdx
@@ -0,0 +1,23 @@
+---
+title: CommandKitOptions
+description: Options for instantiating a CommandKit handler.
+---
+
+## CommandKitOptions
+
+Options for instantiating a CommandKit handler.
+
+| Property | Type | Value | Description |
+| ---------------------- | --------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------- |
+| bulkRegister | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Bulk register application commands instead of one-by-one. |
+| client | Client\ | N/A | The Discord.js client object to use with CommandKit. |
+| commandsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your commands directory. |
+| devGuildIds | Array\ | N/A | List of development guild IDs to restrict devOnly commands to. |
+| devRoleIds | Array\ | N/A | List of developer role IDs to restrict devOnly commands to. |
+| devUserIds | Array\ | N/A | List of developer user IDs to restrict devOnly commands to. |
+| eventsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to your events directory. |
+| experimental | \{ hooks: boolean } | N/A | Options for experimental features. |
+| skipBuiltInValidations | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | N/A | Skip CommandKit's built-in validations (for devOnly commands). |
+| validationsPath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A | The path to the validations directory. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L20)
diff --git a/apps/docs/content/docs/types/CommandObject.mdx b/apps/docs/content/docs/types/CommandObject.mdx
new file mode 100644
index 0000000..26608e1
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandObject.mdx
@@ -0,0 +1,15 @@
+---
+title: CommandObject
+description: No description provided
+---
+
+## CommandObject
+
+- Type: \{
+ category: string \| null,
+ data: CommandData,
+ filePath: string,
+ options: CommandOptions
+ }
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L258)
diff --git a/apps/docs/content/docs/types/CommandOptions.mdx b/apps/docs/content/docs/types/CommandOptions.mdx
new file mode 100644
index 0000000..9876f34
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandOptions.mdx
@@ -0,0 +1,18 @@
+---
+title: CommandOptions
+description: Additional command configuration options.
+---
+
+## CommandOptions
+
+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. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L215)
diff --git a/apps/docs/content/docs/types/CommandProps.mdx b/apps/docs/content/docs/types/CommandProps.mdx
new file mode 100644
index 0000000..64133ab
--- /dev/null
+++ b/apps/docs/content/docs/types/CommandProps.mdx
@@ -0,0 +1,16 @@
+---
+title: CommandProps
+description: Props for command run functions.
+---
+
+## CommandProps
+
+Props for command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | ChatInputCommandInteraction\ \| MessageContextMenuCommandInteraction\ \| UserContextMenuCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L123)
diff --git a/apps/docs/content/docs/types/ContextMenuCommandProps.mdx b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx
new file mode 100644
index 0000000..49a3e62
--- /dev/null
+++ b/apps/docs/content/docs/types/ContextMenuCommandProps.mdx
@@ -0,0 +1,16 @@
+---
+title: ContextMenuCommandProps
+description: Props for context menu command run functions.
+---
+
+## ContextMenuCommandProps
+
+Props for context menu command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | ------------------------------------------ | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | ContextMenuCommandInteraction\ | N/A | The current context menu command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L166)
diff --git a/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx
new file mode 100644
index 0000000..d4816ce
--- /dev/null
+++ b/apps/docs/content/docs/types/MessageContextMenuCommandProps.mdx
@@ -0,0 +1,16 @@
+---
+title: MessageContextMenuCommandProps
+description: Props for message context menu command run functions.
+---
+
+## MessageContextMenuCommandProps
+
+Props for message context menu command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | ------------------------------------------------ | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | MessageContextMenuCommandInteraction\ | N/A | The current command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L183)
diff --git a/apps/docs/content/docs/types/ReloadOptions.mdx b/apps/docs/content/docs/types/ReloadOptions.mdx
new file mode 100644
index 0000000..1239bf2
--- /dev/null
+++ b/apps/docs/content/docs/types/ReloadOptions.mdx
@@ -0,0 +1,12 @@
+---
+title: ReloadOptions
+description: A reload type for commands.
+---
+
+## ReloadOptions
+
+A reload type for commands.
+
+- Type: 'dev' \| 'global' \| ReloadType
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L118)
diff --git a/apps/docs/content/docs/types/SlashCommandProps.mdx b/apps/docs/content/docs/types/SlashCommandProps.mdx
new file mode 100644
index 0000000..00f551a
--- /dev/null
+++ b/apps/docs/content/docs/types/SlashCommandProps.mdx
@@ -0,0 +1,16 @@
+---
+title: SlashCommandProps
+description: Props for slash (chat input) command run functions.
+---
+
+## SlashCommandProps
+
+Props for slash (chat input) command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | ------------------------------------------ | ----- | ---------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | ChatInputCommandInteraction\ | N/A | The current slash (chat input) command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L156)
diff --git a/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx
new file mode 100644
index 0000000..795db07
--- /dev/null
+++ b/apps/docs/content/docs/types/UserContextMenuCommandProps.mdx
@@ -0,0 +1,16 @@
+---
+title: UserContextMenuCommandProps
+description: Props for user context menu command run functions.
+---
+
+## UserContextMenuCommandProps
+
+Props for user context menu command run functions.
+
+| Property | Type | Value | Description |
+| ----------- | --------------------------------------------- | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | UserContextMenuCommandInteraction\ | N/A | The current command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L176)
diff --git a/apps/docs/content/docs/types/ValidationProps.mdx b/apps/docs/content/docs/types/ValidationProps.mdx
new file mode 100644
index 0000000..d0454de
--- /dev/null
+++ b/apps/docs/content/docs/types/ValidationProps.mdx
@@ -0,0 +1,17 @@
+---
+title: ValidationProps
+description: Props for command validation functions.
+---
+
+## ValidationProps
+
+Props for command validation functions.
+
+| Property | Type | Value | Description |
+| ----------- | --------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- |
+| client | Client\ | N/A | The Discord.js client object that CommandKit is handling. |
+| commandObj | CommandObject | N/A | The current (local) target command object. |
+| handler | [CommandKit](/docs/classes/CommandKit.mdx) | N/A | The current CommandKit handler instance. |
+| interaction | ChatInputCommandInteraction\ \| AutocompleteInteraction\ \| ContextMenuCommandInteraction\ | N/A | The current command interaction object. |
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/types.ts#L190)
diff --git a/apps/docs/content/docs/types/index.mdx b/apps/docs/content/docs/types/index.mdx
new file mode 100644
index 0000000..5a44fb9
--- /dev/null
+++ b/apps/docs/content/docs/types/index.mdx
@@ -0,0 +1,113 @@
+---
+title: Interfaces
+description: Interfaces provided by CommandKit
+---
+
+# Types
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/docs/content/docs/variables/index.mdx b/apps/docs/content/docs/variables/index.mdx
new file mode 100644
index 0000000..e0aae25
--- /dev/null
+++ b/apps/docs/content/docs/variables/index.mdx
@@ -0,0 +1,14 @@
+---
+title: Variables
+description: Variables provided by CommandKit
+---
+
+# Variables
+
+
+
+
diff --git a/apps/docs/content/docs/variables/version.mdx b/apps/docs/content/docs/variables/version.mdx
new file mode 100644
index 0000000..593ea4a
--- /dev/null
+++ b/apps/docs/content/docs/variables/version.mdx
@@ -0,0 +1,12 @@
+---
+title: version
+description: The current version of CommandKit.
+---
+
+## version
+
+The current version of CommandKit.
+
+- Type: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
+
+- [Source](https://github.com/underctrl-io/commandkit/blob/c462cc3d6f765a7ee19e33a651f0f2f4666b111b/packages/commandkit/src/index.ts#L11)
diff --git a/package.json b/package.json
index 50db726..7f6bb51 100644
--- a/package.json
+++ b/package.json
@@ -8,10 +8,14 @@
"lint": "turbo lint && prettier --check ./ --ignore-path=.prettierignore",
"build": "turbo lint && turbo build",
"deploy:package": "turbo deploy:package --filter='commandkit' --filter='create-commandkit'",
+ "docgen": "tsx ./scripts/docgen.ts",
"format": "prettier --write ./ --ignore-path=.prettierignore"
},
"devDependencies": {
+ "@types/node": "^22.10.2",
+ "micro-docgen": "^0.3.2",
"prettier": "^3.0.3",
+ "tsx": "^4.7.0",
"turbo": "^2.3.3"
},
"packageManager": "pnpm@9.15.0"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7520df8..5a67f95 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,9 +8,18 @@ importers:
.:
devDependencies:
+ '@types/node':
+ specifier: ^22.10.2
+ version: 22.10.2
+ micro-docgen:
+ specifier: ^0.3.2
+ version: 0.3.2
prettier:
specifier: ^3.0.3
version: 3.0.3
+ tsx:
+ specifier: ^4.7.0
+ version: 4.7.0
turbo:
specifier: ^2.3.3
version: 2.3.3
@@ -613,6 +622,9 @@ packages:
resolution: {integrity: sha512-dlDs/BKioetUP2NT9/iJxz42TAQnwT97bFdclHi8olOYBPYMJQjrRG9LwcGK+Rtt/BKe0hrf94ChbMghwlGnkA==}
hasBin: true
+ '@gerrit0/mini-shiki@1.24.4':
+ resolution: {integrity: sha512-YEHW1QeAg6UmxEmswiQbOVEg1CW22b1XUD/lNTliOsu0LD0wqoyleFMnmbTp697QE0pcadQiR5cVtbbAPncvpw==}
+
'@humanwhocodes/config-array@0.13.0':
resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
engines: {node: '>=10.10.0'}
@@ -1751,6 +1763,10 @@ packages:
resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
engines: {node: '>= 12'}
+ common-tags@1.8.2:
+ resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==}
+ engines: {node: '>=4.0.0'}
+
compute-scroll-into-view@3.1.0:
resolution: {integrity: sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==}
@@ -2738,6 +2754,9 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
load-tsconfig@0.2.5:
resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -2789,6 +2808,9 @@ packages:
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc
+ lunr@2.3.9:
+ resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
+
magic-bytes.js@1.10.0:
resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==}
@@ -2800,6 +2822,10 @@ packages:
resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==}
engines: {node: '>=16'}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
markdown-table@3.0.3:
resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==}
@@ -2858,6 +2884,9 @@ packages:
mdast-util-to-string@4.0.0:
resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
@@ -2865,6 +2894,10 @@ packages:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
+ micro-docgen@0.3.2:
+ resolution: {integrity: sha512-TccygfKfaRX39CAb2nmeX5jY7/6pw7TwuwQgTrMPwgSmffJ2pbEIB73MrjZJVypQPt+UkVxdsds7orUKwe3d8Q==}
+ hasBin: true
+
micromark-core-commonmark@2.0.2:
resolution: {integrity: sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w==}
@@ -3309,6 +3342,10 @@ packages:
property-information@6.4.0:
resolution: {integrity: sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ==}
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
punycode@2.3.0:
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
engines: {node: '>=6'}
@@ -3768,6 +3805,10 @@ packages:
resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==}
engines: {node: '>=14.0.0'}
+ tmp@0.2.3:
+ resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==}
+ engines: {node: '>=14.14'}
+
to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
@@ -3892,6 +3933,13 @@ packages:
resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==}
engines: {node: '>= 0.4'}
+ typedoc@0.27.5:
+ resolution: {integrity: sha512-x+fhKJtTg4ozXwKayh/ek4wxZQI/+2hmZUdO2i2NGDBRUflDble70z+ewHod3d4gRpXSO6fnlnjbDTnJk7HlkQ==}
+ engines: {node: '>= 18'}
+ hasBin: true
+ peerDependencies:
+ typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x
+
typescript@5.3.3:
resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==}
engines: {node: '>=14.17'}
@@ -3902,6 +3950,9 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
ufo@1.3.2:
resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==}
@@ -4124,6 +4175,11 @@ packages:
resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==}
engines: {node: '>= 14'}
+ yaml@2.6.1:
+ resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==}
+ engines: {node: '>= 14'}
+ hasBin: true
+
yocto-queue@0.1.0:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
@@ -4414,6 +4470,12 @@ snapshots:
picocolors: 1.1.1
ts-morph: 24.0.0
+ '@gerrit0/mini-shiki@1.24.4':
+ dependencies:
+ '@shikijs/engine-oniguruma': 1.24.2
+ '@shikijs/types': 1.24.2
+ '@shikijs/vscode-textmate': 9.3.1
+
'@humanwhocodes/config-array@0.13.0':
dependencies:
'@humanwhocodes/object-schema': 2.0.3
@@ -5560,6 +5622,8 @@ snapshots:
commander@8.3.0: {}
+ common-tags@1.8.2: {}
+
compute-scroll-into-view@3.1.0: {}
concat-map@0.0.1: {}
@@ -6879,6 +6943,10 @@ snapshots:
lines-and-columns@1.2.4: {}
+ linkify-it@5.0.0:
+ dependencies:
+ uc.micro: 2.1.0
+
load-tsconfig@0.2.5: {}
local-pkg@0.5.0:
@@ -6925,6 +6993,8 @@ snapshots:
dependencies:
react: 19.0.0
+ lunr@2.3.9: {}
+
magic-bytes.js@1.10.0: {}
magic-string@0.30.5:
@@ -6933,6 +7003,15 @@ snapshots:
markdown-extensions@2.0.0: {}
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
markdown-table@3.0.3: {}
math-intrinsics@1.0.0: {}
@@ -7112,10 +7191,20 @@ snapshots:
dependencies:
'@types/mdast': 4.0.3
+ mdurl@2.0.0: {}
+
merge-stream@2.0.0: {}
merge2@1.4.1: {}
+ micro-docgen@0.3.2:
+ dependencies:
+ commander: 12.1.0
+ common-tags: 1.8.2
+ tmp: 0.2.3
+ typedoc: 0.27.5(typescript@5.7.2)
+ typescript: 5.7.2
+
micromark-core-commonmark@2.0.2:
dependencies:
decode-named-character-reference: 1.0.2
@@ -7723,6 +7812,8 @@ snapshots:
property-information@6.4.0: {}
+ punycode.js@2.3.1: {}
+
punycode@2.3.0: {}
queue-microtask@1.2.3: {}
@@ -8330,6 +8421,8 @@ snapshots:
tinyspy@2.2.0: {}
+ tmp@0.2.3: {}
+
to-regex-range@5.0.1:
dependencies:
is-number: 7.0.0
@@ -8487,10 +8580,21 @@ snapshots:
possible-typed-array-names: 1.0.0
reflect.getprototypeof: 1.0.8
+ typedoc@0.27.5(typescript@5.7.2):
+ dependencies:
+ '@gerrit0/mini-shiki': 1.24.4
+ lunr: 2.3.9
+ markdown-it: 14.1.0
+ minimatch: 9.0.5
+ typescript: 5.7.2
+ yaml: 2.6.1
+
typescript@5.3.3: {}
typescript@5.7.2: {}
+ uc.micro@2.1.0: {}
+
ufo@1.3.2: {}
unbox-primitive@1.0.2:
@@ -8742,6 +8846,8 @@ snapshots:
yaml@2.3.4: {}
+ yaml@2.6.1: {}
+
yocto-queue@0.1.0: {}
yocto-queue@1.0.0: {}
diff --git a/scripts/docgen.ts b/scripts/docgen.ts
new file mode 100644
index 0000000..e962ebc
--- /dev/null
+++ b/scripts/docgen.ts
@@ -0,0 +1,135 @@
+import { createDocumentation } from 'micro-docgen';
+import { writeFile } from 'node:fs/promises';
+
+async function main() {
+ const docs = await createDocumentation({
+ tsconfigPath: './packages/commandkit/tsconfig.json',
+ input: ['./packages/commandkit/src'],
+ markdown: true,
+ clean: true,
+ typeLinkerBasePath: '/docs',
+ extension: 'mdx',
+ includeMarkdownHeaders: true,
+ output: './apps/docs/content/docs',
+ });
+
+ console.log(`Generated docs in ${docs.metadata.generationMs}`);
+
+ const mod = docs.modules?.commandkit;
+
+ if (!mod) return;
+
+ const heading = (name: string, description: string) =>
+ `---\ntitle: ${name}\ndescription: ${
+ description || 'No description available.'
+ }\n---\n\n`;
+
+ const classes = Object.values(mod.classes).map((cls) => {
+ return ``;
+ });
+
+ const types = Object.values(mod.types).map((int) => {
+ return ``;
+ });
+
+ const functions = Object.values(mod.functions).map((func) => {
+ return ``;
+ });
+
+ const variables = Object.values(mod.variables).map((varr) => {
+ return ``;
+ });
+
+ const enums = Object.values(mod.enum).map((en) => {
+ return ``;
+ });
+
+ const classesContent = classes.length
+ ? `# Classes\n\n${classes.join('\n\n')}`
+ : '';
+
+ const interfacesContent = types.length
+ ? `# Types\n\n${types.join('\n\n')}`
+ : '';
+
+ const functionsContent = functions.length
+ ? `# Functions\n\n${functions.join('\n\n')}`
+ : '';
+
+ const variablesContent = variables.length
+ ? `# Variables\n\n${variables.join('\n\n')}`
+ : '';
+
+ const enumsContent = enums.length
+ ? `# Enums\n\n${enums.join('\n\n')}`
+ : '';
+
+ const content = [
+ heading(
+ mod.name,
+ 'Beginner friendly command & event handler for Discord.js',
+ ),
+ '\n',
+ classesContent,
+ '\n',
+ interfacesContent,
+ '\n',
+ functionsContent,
+ '\n',
+ variablesContent,
+ '\n',
+ enumsContent,
+ ].join('\n');
+
+ // classes index
+ if (classesContent)
+ await writeFile(
+ './apps/docs/content/docs/classes/index.mdx',
+ heading('Classes', 'Classes provided by CommandKit') + classesContent,
+ ).catch(Object);
+
+ // interfaces index
+ if (interfacesContent)
+ await writeFile(
+ './apps/docs/content/docs/types/index.mdx',
+ heading('Interfaces', 'Interfaces provided by CommandKit') +
+ interfacesContent,
+ ).catch(Object);
+
+ // functions index
+ if (functionsContent)
+ await writeFile(
+ './apps/docs/content/docs/functions/index.mdx',
+ heading('Functions', 'Functions provided by CommandKit') +
+ functionsContent,
+ ).catch(Object);
+
+ // variables index
+ if (variablesContent)
+ await writeFile(
+ './apps/docs/content/docs/variables/index.mdx',
+ heading('Variables', 'Variables provided by CommandKit') +
+ variablesContent,
+ ).catch(Object);
+
+ // enums index
+ if (enumsContent)
+ await writeFile(
+ './apps/docs/content/docs/enums/index.mdx',
+ heading('Enums', 'Enums provided by CommandKit') + enumsContent,
+ ).catch(Object);
+
+ await writeFile('./apps/docs/content/docs/index.mdx', content);
+}
+
+main();