Skip to content

Commit ba7bc22

Browse files
committed
docs: generate api docs
1 parent 67393b8 commit ba7bc22

31 files changed

+97
-40
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ git checkout -b your-feature-or-bugfix
3939
2. Make your changes. Please make sure to use the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension for consistent formatting and comments wherever necessary.
4040

4141
3. Ensure that your changes don't break any existing functionality. You can test the functionality of your code depending on where you've made changes:
42-
4342
1. If you've made changes to the CommandKit package, you can use the "apps/test-bot" project to test your own bot. Just make sure to create a new `.env` file with the template from the `.env.example` file provided. This also requires you to build the commandkit package locally (after you make your changes) because it's symlinked with pnpm workspaces.
4443
2. If you've made changes to the docs, you can run `pnpm dev` inside "apps/website" to spin up a local development server.
4544

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="150" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/app/handlers/AppCommandHandler.ts" sourceLine="149" 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-kit.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## CommandKit
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="92" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="94" packageName="commandkit" />
1717

1818
The commandkit class that serves as the main entry point for the CommandKit framework.
1919

@@ -22,10 +22,11 @@ class CommandKit extends EventEmitter {
2222
public eventInterceptor!: EventInterceptor;
2323
public static readonly createElement = createElement;
2424
public static readonly Fragment = Fragment;
25-
public readonly config: CommandKitConfiguration = {
25+
public readonly appConfig: CommandKitConfiguration = {
2626
defaultLocale: Locale.EnglishUS,
2727
getMessageCommandPrefix: () => '!',
2828
};
29+
public config: ResolvedCommandKitConfig = getConfig();
2930
public readonly store = new Map<string, any>();
3031
public readonly flags = new FlagStore();
3132
public commandsRouter!: CommandsRouter;
@@ -73,11 +74,16 @@ The static createElement function to create jsx elements
7374
<MemberInfo kind="property" type={``} />
7475

7576
The static Fragment component to create jsx fragments
76-
### config
77+
### appConfig
7778

7879
<MemberInfo kind="property" type={`<a href='/docs/next/api-reference/commandkit/interfaces/command-kit-configuration#commandkitconfiguration'>CommandKitConfiguration</a>`} />
7980

8081
The configuration for the CommandKit instance.
82+
### config
83+
84+
<MemberInfo kind="property" type={`<a href='/docs/next/api-reference/commandkit/types/resolved-command-kit-config#resolvedcommandkitconfig'>ResolvedCommandKitConfig</a>`} />
85+
86+
The configuration for the CommandKit environment.
8187
### store
8288

8389
<MemberInfo kind="property" type={``} />
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: "NoopLogger"
3+
isDefaultIndex: false
4+
generated: true
5+
---
6+
7+
import MemberInfo from '@site/src/components/MemberInfo';
8+
import GenerationInfo from '@site/src/components/GenerationInfo';
9+
import MemberDescription from '@site/src/components/MemberDescription';
10+
11+
<!-- This file was generated from the CommandKit source. Do not modify. Instead, re-run the "docgen" script -->
12+
13+
14+
## NoopLogger
15+
16+
<GenerationInfo sourceFile="packages/commandkit/src/logger/NoopLogger.ts" sourceLine="6" packageName="commandkit" />
17+
18+
Noop logger implementation that does nothing.
19+
20+
```ts title="Signature"
21+
class NoopLogger implements ILogger {
22+
debug(args: any[]) => void;
23+
error(args: any[]) => void;
24+
log(args: any[]) => void;
25+
info(args: any[]) => void;
26+
warn(args: any[]) => void;
27+
}
28+
```
29+
* Implements: <code><a href='/docs/next/api-reference/commandkit/interfaces/ilogger#ilogger'>ILogger</a></code>
30+
31+
32+
33+
<div className="members-wrapper">
34+
35+
### debug
36+
37+
<MemberInfo kind="method" type={`(args: any[]) => void`} />
38+
39+
Logs a debug message.
40+
### error
41+
42+
<MemberInfo kind="method" type={`(args: any[]) => void`} />
43+
44+
Logs an error message.
45+
### log
46+
47+
<MemberInfo kind="method" type={`(args: any[]) => void`} />
48+
49+
Logs a default message.
50+
### info
51+
52+
<MemberInfo kind="method" type={`(args: any[]) => void`} />
53+
54+
Logs an info message.
55+
### warn
56+
57+
<MemberInfo kind="method" type={`(args: any[]) => void`} />
58+
59+
Logs a warning message.
60+
61+
62+
</div>

apps/website/docs/api-reference/commandkit/functions/on-application-bootstrap.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
## onApplicationBootstrap
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="83" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="85" packageName="commandkit" />
1717

1818
Registers a bootstrap hook that will be called when the CommandKit instance is created.
1919
This is useful for plugins that need to run some code after the CommandKit instance is fully initialized.

apps/website/docs/api-reference/commandkit/functions/on-bootstrap.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
## onBootstrap
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="67" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="69" packageName="commandkit" />
1717

1818
Registers a bootstrap hook that will be called when the CommandKit instance is created.
1919
This is useful for plugins that need to run some code after the CommandKit instance is fully initialized.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ interface CommandKitConfig {
5454
};
5555
typedCommands?: boolean;
5656
disablePrefixCommands?: boolean;
57+
showUnknownPrefixCommandsWarning?: boolean;
5758
}
5859
```
5960

@@ -110,6 +111,11 @@ Whether or not to enable the typed commands.
110111
<MemberInfo kind="property" type={`boolean`} default={`false`} />
111112

112113
Whether or not to disable the prefix commands.
114+
### showUnknownPrefixCommandsWarning
115+
116+
<MemberInfo kind="property" type={`boolean`} default={`true`} />
117+
118+
Whether or not to show a warning when a prefix command is not found. This only affects development mode.
113119

114120

115121
</div>

apps/website/docs/api-reference/commandkit/interfaces/command-kit-configuration.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
## CommandKitConfiguration
1515

16-
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="28" packageName="commandkit" />
16+
<GenerationInfo sourceFile="packages/commandkit/src/CommandKit.ts" sourceLine="30" packageName="commandkit" />
1717

1818
Configurations for the CommandKit instance.
1919

apps/website/docs/api-reference/commandkit/interfaces/custom-app-command-props.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
## CustomAppCommandProps
1515

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

1818
Custom properties that can be added to an AppCommand.
1919
This allows for additional metadata or configuration to be associated with a command.

apps/website/docs/api-reference/commandkit/interfaces/loaded-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
## LoadedCommand
1515

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

1818
Represents a loaded command with its metadata and configuration.
1919

0 commit comments

Comments
 (0)