Skip to content

Commit

Permalink
chore: docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed Dec 14, 2024
1 parent 7e608cc commit c2f316b
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 71 deletions.
28 changes: 14 additions & 14 deletions apps/docs/content/docs/classes/ButtonKit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: No description provided
## ButtonKit extends ButtonBuilder

```typescript
ButtonKit(data);
new ButtonKit(data);
```

| Parameter | Type | Optional |
Expand All @@ -23,7 +23,7 @@ The API data associated with this component.

### public dispose(): ButtonKit

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L165)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L165)

### public onClick(handler, data?): this

Expand Down Expand Up @@ -59,15 +59,15 @@ button.onClick(null);
| 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/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L74)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L74)

### public onEnd(handler): this

| Parameter | Type | Optional |
| --------- | ---------------------------- | -------- |
| handler | CommandKitButtonBuilderOnEnd ||

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L98)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L98)

### public setCustomId(customId): this

Expand All @@ -89,9 +89,9 @@ Sets whether this button is disabled.

Sets the emoji to display on this button.

| Parameter | Type | Optional | Description |
| --------- | ------------------------ | -------- | ---------------- |
| emoji | ComponentEmojiResolvable || The emoji to use |
| Parameter | Type | Optional | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------- | -------- | ---------------- |
| emoji | [ComponentEmojiResolvable](https://discord.js.org/docs/packages/discord.js/main/ComponentEmojiResolvable:TypeAlias) || The emoji to use |

### public setLabel(label): this

Expand All @@ -113,9 +113,9 @@ Sets the SKU id that represents a purchasable SKU for this button.

Sets the style of this button.

| Parameter | Type | Optional | Description |
| --------- | ----------- | -------- | ---------------- |
| style | ButtonStyle || The style to use |
| Parameter | Type | Optional | Description |
| --------- | --------------------------------------------------------------------------------------- | -------- | ---------------- |
| style | [ButtonStyle](https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle) || The style to use |

### public setURL(url): this

Expand All @@ -125,12 +125,12 @@ Sets the URL for this button.
| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------- |
| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The URL to use |

### public toJSON(): APIButtonComponent
### public toJSON(): [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)

ComponentBuilder.toJSON

### public static from(other): ButtonBuilder

| Parameter | Type | Optional |
| --------- | ------------------ | ---------------------------------- | --- |
| other | APIButtonComponent | JSONEncodable\<APIButtonComponent> ||
| Parameter | Type | Optional |
| --------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | --- |
| other | [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) | JSONEncodable\<[APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)> ||
28 changes: 14 additions & 14 deletions apps/docs/content/docs/classes/CommandKit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: No description provided
## CommandKit

```typescript
CommandKit(options);
new CommandKit(options);
```

| Parameter | Type | Optional | Description |
Expand All @@ -17,47 +17,47 @@ CommandKit(options);

### public static \_instance: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L12)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L12)

### public client: any

Get the client attached to this CommandKit instance.

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L42)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L42)

### public commandHandler: any

Get command handler instance.

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L49)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L49)

### public commands: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L128)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L128)

### public commandsPath: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L144)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L144)

### public devGuildIds: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L172)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L172)

### public devRoleIds: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L179)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L179)

### public devUserIds: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L165)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L165)

### public eventsPath: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L151)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L151)

### public validationsPath: any

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L158)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L158)

## Methods

Expand All @@ -69,16 +69,16 @@ Updates application commands with the latest from "commandsPath".
| --------- | ------------- | -------- |
| type | ReloadOptions ||

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L104)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L104)

### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>

Updates application events with the latest from "eventsPath".

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L112)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L112)

### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>

Updates application command validations with the latest from "validationsPath".

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/CommandKit.ts#L120)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/CommandKit.ts#L120)
2 changes: 1 addition & 1 deletion apps/docs/content/docs/enums/ReloadType.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ description: No description provided
| Developer | 'dev' | N/A | Reload developer/guild commands. |
| Global | 'global' | N/A | Reload global commands. |

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/types.ts#L275)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/types.ts#L275)
2 changes: 1 addition & 1 deletion apps/docs/content/docs/functions/defineConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: No description provided
| --------- | ---------------------------------------------------------------- | -------- |
| config | PartialConfig\<[CommandKitConfig](/docs/types/CommandKitConfig)> ||

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/config.ts#L71)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/config.ts#L71)
2 changes: 1 addition & 1 deletion apps/docs/content/docs/functions/getConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ description: No description provided

### getConfig(): [CommandKitConfig](/docs/types/CommandKitConfig)

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/config.ts#L60)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/config.ts#L60)
2 changes: 1 addition & 1 deletion apps/docs/content/docs/types/AutocompleteProps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Props for autocomplete command run functions.
| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The current CommandKit handler instance. |
| interaction | [AutocompleteInteraction\<CacheType>](https://discord.js.org/docs/packages/discord.js/main/AutocompleteInteraction:Class) | N/A | The current autocomplete command interaction object. |

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/types.ts#L137)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/types.ts#L137)
12 changes: 6 additions & 6 deletions apps/docs/content/docs/types/CommandContext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description: Represents a command context.

Represents a command context.

| Property | Type | Value | Description |
| ----------- | ------------------------------------------------------------------------------------- | ----- | -------------------------------------------- |
| client | [Client\<boolean>](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The client that instantiated this command. |
| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The command data. |
| interaction | Interaction\<CacheType> | N/A | The interaction that triggered this command. |
| Property | Type | Value | Description |
| ----------- | ------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------- |
| client | [Client\<boolean>](https://discord.js.org/docs/packages/discord.js/main/Client:Class) | N/A | The client that instantiated this command. |
| handler | [CommandKit](/docs/classes/CommandKit) | N/A | The command data. |
| interaction | [Interaction\<CacheType>](https://discord.js.org/docs/packages/discord.js/main/Interaction:Class) | N/A | The interaction that triggered this command. |

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/types.ts#L71)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/types.ts#L71)
4 changes: 2 additions & 2 deletions apps/docs/content/docs/types/CommandData.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ description: No description provided

## CommandData

- Type: RESTPostAPIApplicationCommandsJSONBody
- Type: [RESTPostAPIApplicationCommandsJSONBody](https://discord-api-types.dev/api/discord-api-types-v10#RESTPostAPIApplicationCommandsJSONBody)

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/types.ts#L247)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/types.ts#L247)
18 changes: 9 additions & 9 deletions apps/docs/content/docs/types/CommandFileObject.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ description: Represents a command file.

Represents a command file.

| Property | Type | Value |
| ------------ | ------------------------------------------------------------------------------------------------- | ----- |
| autocomplete | ( ctx: CommandContext\<Interaction, Cached> ) => 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\<Interaction, Cached> ) => void | N/A |
| Property | Type | Value |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| autocomplete | ( ctx: CommandContext\<Interaction, Cached> ) => void | N/A |
| category | null \| string | N/A |
| data | [RESTPostAPIApplicationCommandsJSONBody](https://discord-api-types.dev/api/discord-api-types-v10#RESTPostAPIApplicationCommandsJSONBody) | N/A |
| filePath | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | N/A |
| options | CommandOptions | N/A |
| run | ( ctx: CommandContext\<Interaction, Cached> ) => void | N/A |

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/types.ts#L92)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/types.ts#L92)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ If the first argument is null, it means that the interaction collector has been
interaction: ButtonInteraction
) => Awaitable\<void>

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L17)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L17)
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ description: No description provided
time: number
} & Omit\<InteractionCollectorOptions\<ButtonInteraction>, 'filter' \| 'componentType'>

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L23)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L23)
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: No description provided
...args: unknown\[]
) => Awaitable\<void>

- [Source](https://github.com/underctrl-io/commandkit/blob/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/components/ButtonKit.ts#L21)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/components/ButtonKit.ts#L21)
2 changes: 1 addition & 1 deletion apps/docs/content/docs/types/CommandKitConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ description: No description provided
| 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/6165e6a1296074517b13a566a6b705fa6b059dbc/packages/commandkit/src/config.ts#L1)
- [Source](https://github.com/underctrl-io/commandkit/blob/7e608cc8c859522925eced5a54de0a18e9cbc1e9/packages/commandkit/src/config.ts#L1)
Loading

0 comments on commit c2f316b

Please sign in to comment.