Skip to content

Commit a923ede

Browse files
committed
docs: generate api docs
1 parent db1b157 commit a923ede

File tree

7 files changed

+30
-14
lines changed

7 files changed

+30
-14
lines changed

apps/website/docs/api-reference/commandkit/classes/app-command-handler.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AppCommandHandler
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="181" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="195" packageName="commandkit" />
1717

1818
Handles application commands for CommandKit, including loading, registration, and execution.
1919
Manages both slash commands and message commands with middleware support.

apps/website/docs/api-reference/commandkit/classes/command-registrar.mdx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,19 @@ Handles registration of Discord application commands (slash commands, context me
2020
```ts title="Signature"
2121
class CommandRegistrar {
2222
constructor(commandkit: CommandKit)
23-
getCommandsData() => (CommandData & { __metadata?: CommandMetadata })[];
23+
getCommandsData() => (CommandData & {
24+
__metadata?: CommandMetadata;
25+
__applyId(id: string): void;
26+
})[];
2427
register() => ;
25-
updateGlobalCommands(commands: (CommandData & { __metadata?: CommandMetadata })[]) => ;
26-
updateGuildCommands(commands: (CommandData & { __metadata?: CommandMetadata })[]) => ;
28+
updateGlobalCommands(commands: (CommandData & {
29+
__metadata?: CommandMetadata;
30+
__applyId(id: string): void;
31+
})[]) => ;
32+
updateGuildCommands(commands: (CommandData & {
33+
__metadata?: CommandMetadata;
34+
__applyId(id: string): void;
35+
})[]) => ;
2736
}
2837
```
2938

@@ -36,7 +45,7 @@ class CommandRegistrar {
3645
Creates an instance of CommandRegistrar.
3746
### getCommandsData
3847

39-
<MemberInfo kind="method" type={`() => (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a> })[]`} />
48+
<MemberInfo kind="method" type={`() => (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a>; __applyId(id: string): void; })[]`} />
4049

4150
Gets the commands data.
4251
### register
@@ -46,12 +55,12 @@ Gets the commands data.
4655
Registers loaded commands.
4756
### updateGlobalCommands
4857

49-
<MemberInfo kind="method" type={`(commands: (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a> })[]) => `} />
58+
<MemberInfo kind="method" type={`(commands: (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a>; __applyId(id: string): void; })[]) => `} />
5059

5160
Updates the global commands.
5261
### updateGuildCommands
5362

54-
<MemberInfo kind="method" type={`(commands: (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a> })[]) => `} />
63+
<MemberInfo kind="method" type={`(commands: (<a href='/docs/api-reference/commandkit/types/command-data#commanddata'>CommandData</a> &#38; { __metadata?: <a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a>; __applyId(id: string): void; })[]) => `} />
5564

5665
Updates the guild commands.
5766

apps/website/docs/api-reference/commandkit/interfaces/loaded-command.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Represents a loaded command with its metadata and configuration.
1919

2020
```ts title="Signature"
2121
interface LoadedCommand {
22+
discordId: string | null;
2223
command: Command;
2324
metadata: CommandMetadata;
2425
data: AppCommand;
@@ -27,21 +28,27 @@ interface LoadedCommand {
2728

2829
<div className="members-wrapper">
2930

31+
### discordId
32+
33+
<MemberInfo kind="property" type={`string | null`} />
34+
35+
The associated discord snowflake id for this command.
36+
If the information is not yet available, this will be `null`.
3037
### command
3138

3239
<MemberInfo kind="property" type={`<a href='/docs/api-reference/commandkit/interfaces/command#command'>Command</a>`} />
3340

34-
41+
The command data.
3542
### metadata
3643

3744
<MemberInfo kind="property" type={`<a href='/docs/api-reference/commandkit/interfaces/command-metadata#commandmetadata'>CommandMetadata</a>`} />
3845

39-
46+
The metadata for this command.
4047
### data
4148

4249
<MemberInfo kind="property" type={`<a href='/docs/api-reference/commandkit/types/app-command#appcommand'>AppCommand</a>`} />
4350

44-
51+
The data for this command.
4552

4653

4754
</div>

apps/website/docs/api-reference/commandkit/interfaces/prepared-app-command-execution.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## PreparedAppCommandExecution
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="120" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="134" packageName="commandkit" />
1717

1818
Represents a prepared command execution with all necessary data and middleware.
1919

apps/website/docs/api-reference/commandkit/types/command-builder-like.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## CommandBuilderLike
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="129" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="143" packageName="commandkit" />
1717

1818
Type representing command builder objects supported by CommandKit.
1919

apps/website/docs/api-reference/commandkit/types/command-type-data.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## CommandTypeData
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="101" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="115" packageName="commandkit" />
1717

1818
Type representing command data identifier.
1919

apps/website/docs/api-reference/commandkit/types/resolvable-command.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## ResolvableCommand
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="106" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="120" packageName="commandkit" />
1717

1818
Type for commands that can be resolved by the handler.
1919

0 commit comments

Comments
 (0)