ResolvedCommandKitConfig`} />
+
+The configuration for the CommandKit environment.
### store
diff --git a/apps/website/docs/api-reference/commandkit/classes/noop-logger.mdx b/apps/website/docs/api-reference/commandkit/classes/noop-logger.mdx
new file mode 100644
index 00000000..1c90cb69
--- /dev/null
+++ b/apps/website/docs/api-reference/commandkit/classes/noop-logger.mdx
@@ -0,0 +1,62 @@
+---
+title: "NoopLogger"
+isDefaultIndex: false
+generated: true
+---
+
+import MemberInfo from '@site/src/components/MemberInfo';
+import GenerationInfo from '@site/src/components/GenerationInfo';
+import MemberDescription from '@site/src/components/MemberDescription';
+
+
+
+
+## NoopLogger
+
+
+
+Noop logger implementation that does nothing.
+
+```ts title="Signature"
+class NoopLogger implements ILogger {
+ debug(args: any[]) => void;
+ error(args: any[]) => void;
+ log(args: any[]) => void;
+ info(args: any[]) => void;
+ warn(args: any[]) => void;
+}
+```
+* Implements: ILogger
+
+
+
+
+
+### debug
+
+ void`} />
+
+Logs a debug message.
+### error
+
+ void`} />
+
+Logs an error message.
+### log
+
+ void`} />
+
+Logs a default message.
+### info
+
+ void`} />
+
+Logs an info message.
+### warn
+
+ void`} />
+
+Logs a warning message.
+
+
+
diff --git a/apps/website/docs/api-reference/commandkit/functions/on-application-bootstrap.mdx b/apps/website/docs/api-reference/commandkit/functions/on-application-bootstrap.mdx
index 51308577..ba56cde8 100644
--- a/apps/website/docs/api-reference/commandkit/functions/on-application-bootstrap.mdx
+++ b/apps/website/docs/api-reference/commandkit/functions/on-application-bootstrap.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## onApplicationBootstrap
-
+
Registers a bootstrap hook that will be called when the CommandKit instance is created.
This is useful for plugins that need to run some code after the CommandKit instance is fully initialized.
diff --git a/apps/website/docs/api-reference/commandkit/functions/on-bootstrap.mdx b/apps/website/docs/api-reference/commandkit/functions/on-bootstrap.mdx
index cdc0e9a8..231edfab 100644
--- a/apps/website/docs/api-reference/commandkit/functions/on-bootstrap.mdx
+++ b/apps/website/docs/api-reference/commandkit/functions/on-bootstrap.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## onBootstrap
-
+
Registers a bootstrap hook that will be called when the CommandKit instance is created.
This is useful for plugins that need to run some code after the CommandKit instance is fully initialized.
diff --git a/apps/website/docs/api-reference/commandkit/interfaces/command-kit-config.mdx b/apps/website/docs/api-reference/commandkit/interfaces/command-kit-config.mdx
index fbb793a3..f151ab8f 100644
--- a/apps/website/docs/api-reference/commandkit/interfaces/command-kit-config.mdx
+++ b/apps/website/docs/api-reference/commandkit/interfaces/command-kit-config.mdx
@@ -54,6 +54,7 @@ interface CommandKitConfig {
};
typedCommands?: boolean;
disablePrefixCommands?: boolean;
+ showUnknownPrefixCommandsWarning?: boolean;
}
```
@@ -110,6 +111,11 @@ Whether or not to enable the typed commands.
Whether or not to disable the prefix commands.
+### showUnknownPrefixCommandsWarning
+
+
+
+Whether or not to show a warning when a prefix command is not found. This only affects development mode.
diff --git a/apps/website/docs/api-reference/commandkit/interfaces/command-kit-configuration.mdx b/apps/website/docs/api-reference/commandkit/interfaces/command-kit-configuration.mdx
index 6c5c7f5d..681bc7f5 100644
--- a/apps/website/docs/api-reference/commandkit/interfaces/command-kit-configuration.mdx
+++ b/apps/website/docs/api-reference/commandkit/interfaces/command-kit-configuration.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandKitConfiguration
-
+
Configurations for the CommandKit instance.
diff --git a/apps/website/docs/api-reference/commandkit/interfaces/custom-app-command-props.mdx b/apps/website/docs/api-reference/commandkit/interfaces/custom-app-command-props.mdx
index b482ad50..13705da7 100644
--- a/apps/website/docs/api-reference/commandkit/interfaces/custom-app-command-props.mdx
+++ b/apps/website/docs/api-reference/commandkit/interfaces/custom-app-command-props.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CustomAppCommandProps
-
+
Custom properties that can be added to an AppCommand.
This allows for additional metadata or configuration to be associated with a command.
diff --git a/apps/website/docs/api-reference/commandkit/interfaces/loaded-command.mdx b/apps/website/docs/api-reference/commandkit/interfaces/loaded-command.mdx
index 13d1c314..998315f2 100644
--- a/apps/website/docs/api-reference/commandkit/interfaces/loaded-command.mdx
+++ b/apps/website/docs/api-reference/commandkit/interfaces/loaded-command.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## LoadedCommand
-
+
Represents a loaded command with its metadata and configuration.
diff --git a/apps/website/docs/api-reference/commandkit/interfaces/prepared-app-command-execution.mdx b/apps/website/docs/api-reference/commandkit/interfaces/prepared-app-command-execution.mdx
index 9ef995db..31c33be2 100644
--- a/apps/website/docs/api-reference/commandkit/interfaces/prepared-app-command-execution.mdx
+++ b/apps/website/docs/api-reference/commandkit/interfaces/prepared-app-command-execution.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## PreparedAppCommandExecution
-
+
Represents a prepared command execution with all necessary data and middleware.
diff --git a/apps/website/docs/api-reference/commandkit/types/app-command.mdx b/apps/website/docs/api-reference/commandkit/types/app-command.mdx
index 7e1b4d52..6c08f161 100644
--- a/apps/website/docs/api-reference/commandkit/types/app-command.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/app-command.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## AppCommand
-
+
Represents a command in the CommandKit application, including its metadata and handlers.
This type extends the native command structure with additional properties.
diff --git a/apps/website/docs/api-reference/commandkit/types/bootstrap-function.mdx b/apps/website/docs/api-reference/commandkit/types/bootstrap-function.mdx
index 6b57edf3..91ea849e 100644
--- a/apps/website/docs/api-reference/commandkit/types/bootstrap-function.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/bootstrap-function.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## BootstrapFunction
-
+
Represents the function executed during the bootstrap phase of CommandKit.
diff --git a/apps/website/docs/api-reference/commandkit/types/command-builder-like.mdx b/apps/website/docs/api-reference/commandkit/types/command-builder-like.mdx
index 93c373fd..30c3ed1f 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-builder-like.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-builder-like.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandBuilderLike
-
+
Type representing command builder objects supported by CommandKit.
diff --git a/apps/website/docs/api-reference/commandkit/types/command-data-schema-key.mdx b/apps/website/docs/api-reference/commandkit/types/command-data-schema-key.mdx
index 39f66319..d5fe2e01 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-data-schema-key.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-data-schema-key.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandDataSchemaKey
-
+
diff --git a/apps/website/docs/api-reference/commandkit/types/command-data-schema-value.mdx b/apps/website/docs/api-reference/commandkit/types/command-data-schema-value.mdx
index d0bc09c5..196a32fc 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-data-schema-value.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-data-schema-value.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandDataSchemaValue
-
+
diff --git a/apps/website/docs/api-reference/commandkit/types/command-data-schema.mdx b/apps/website/docs/api-reference/commandkit/types/command-data-schema.mdx
index e14a0d40..e4284f18 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-data-schema.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-data-schema.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandDataSchema
-
+
diff --git a/apps/website/docs/api-reference/commandkit/types/command-data.mdx b/apps/website/docs/api-reference/commandkit/types/command-data.mdx
index 47a36f34..e6385440 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-data.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-data.mdx
@@ -22,6 +22,7 @@ type CommandData = Prettify<
Omit & {
description?: string;
guilds?: string[];
+ aliases?: string[];
}
>
```
diff --git a/apps/website/docs/api-reference/commandkit/types/command-type-data.mdx b/apps/website/docs/api-reference/commandkit/types/command-type-data.mdx
index 7e6528b3..b2a06c35 100644
--- a/apps/website/docs/api-reference/commandkit/types/command-type-data.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/command-type-data.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CommandTypeData
-
+
Type representing command data identifier.
diff --git a/apps/website/docs/api-reference/commandkit/types/resolvable-command.mdx b/apps/website/docs/api-reference/commandkit/types/resolvable-command.mdx
index f7c894eb..be379f6b 100644
--- a/apps/website/docs/api-reference/commandkit/types/resolvable-command.mdx
+++ b/apps/website/docs/api-reference/commandkit/types/resolvable-command.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## ResolvableCommand
-
+
Type for commands that can be resolved by the handler.
diff --git a/apps/website/docs/api-reference/commandkit/variables/commandkit.mdx b/apps/website/docs/api-reference/commandkit/variables/commandkit.mdx
index b4d6345f..008c5e95 100644
--- a/apps/website/docs/api-reference/commandkit/variables/commandkit.mdx
+++ b/apps/website/docs/api-reference/commandkit/variables/commandkit.mdx
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
## commandkit
-
+
The singleton instance of CommandKit.
diff --git a/apps/website/docs/guide/01-getting-started/04-commandkit-config.mdx b/apps/website/docs/guide/01-getting-started/04-commandkit-config.mdx
index bc6d4fbb..62b58f3a 100644
--- a/apps/website/docs/guide/01-getting-started/04-commandkit-config.mdx
+++ b/apps/website/docs/guide/01-getting-started/04-commandkit-config.mdx
@@ -109,7 +109,6 @@ export default defineConfig({
1. **Type Safety**: Always use `commandkit.config.ts` for better type checking and IDE support.
2. **Security**: Always store sensitive information in `.env` file and make sure it is not committed to your version control system.
3. **Plugin Management**:
-
- Only include necessary plugins to keep build times fast
- Plugins have full access to your discord bot. So always be careful when installing the plugins.
diff --git a/apps/website/docs/guide/01-getting-started/05-using-commandkit-cli.mdx b/apps/website/docs/guide/01-getting-started/05-using-commandkit-cli.mdx
index da72defd..8849212f 100644
--- a/apps/website/docs/guide/01-getting-started/05-using-commandkit-cli.mdx
+++ b/apps/website/docs/guide/01-getting-started/05-using-commandkit-cli.mdx
@@ -93,13 +93,11 @@ npx commandkit create event ready
## Best Practices
1. **Development Workflow**:
-
- Use `commandkit dev` during development for instant feedback
- Enable debug mode when troubleshooting issues
- Keep your `.env` file updated with all required variables
2. **Production Deployment**:
-
- Always run `commandkit build` before deploying
- Test the production build locally before deployment
- Use environment variables for sensitive data
diff --git a/apps/website/docs/guide/04-caching/01-caching-in-commandkit.mdx b/apps/website/docs/guide/04-caching/01-caching-in-commandkit.mdx
index 7ba787bb..ee727bdc 100644
--- a/apps/website/docs/guide/04-caching/01-caching-in-commandkit.mdx
+++ b/apps/website/docs/guide/04-caching/01-caching-in-commandkit.mdx
@@ -72,13 +72,11 @@ When you call this function multiple times with the same `userId`, it will only
CommandKit's caching system works by:
1. **Generating a Cache Key**: Each cached function call generates a unique key based on:
-
- The function's identity
- The arguments passed to the function
- A build ID for stability
2. **Storing Results**: When a function is called:
-
- If the result isn't cached, the function executes and stores its result
- If the result is cached, it's returned immediately without executing the function
@@ -107,19 +105,16 @@ async function fetchUserData(userId: string) {
## Best Practices
1. **Choose What to Cache**:
-
- Cache expensive operations (API calls, database queries)
- Cache data that doesn't change frequently
- Don't cache sensitive or frequently changing data
2. **Set Appropriate TTL**:
-
- Use shorter TTL for frequently changing data
- Use longer TTL for static data
- Consider your data's update frequency
3. **Use Tags for Revalidation**:
-
- Add meaningful tags to your cache entries
- Group related cache entries with the same tag
- Use tags for targeted cache invalidation
diff --git a/apps/website/docs/guide/04-caching/02-cacheTag-function.mdx b/apps/website/docs/guide/04-caching/02-cacheTag-function.mdx
index 40b24836..190c2bc7 100644
--- a/apps/website/docs/guide/04-caching/02-cacheTag-function.mdx
+++ b/apps/website/docs/guide/04-caching/02-cacheTag-function.mdx
@@ -79,13 +79,11 @@ await revalidateTag('user:123');
## Best Practices
1. **Use Consistent Naming**:
-
- Follow a consistent pattern (e.g., `type:id`)
- Make tags descriptive and meaningful
- Use hierarchical tags when appropriate
2. **Group Related Data**:
-
- Tag related cache entries with the same tag
- Use multiple tags for cross-category entries
- Consider data relationships when tagging
diff --git a/apps/website/docs/guide/04-caching/03-cacheLife-function.mdx b/apps/website/docs/guide/04-caching/03-cacheLife-function.mdx
index ff5cabc5..b3088481 100644
--- a/apps/website/docs/guide/04-caching/03-cacheLife-function.mdx
+++ b/apps/website/docs/guide/04-caching/03-cacheLife-function.mdx
@@ -99,13 +99,11 @@ async function fetchData(type: 'frequent' | 'rare') {
## Best Practices
1. **Choose Appropriate Duration**:
-
- Use shorter TTL for frequently changing data
- Use longer TTL for static content
- Consider your data update patterns
2. **Balance Freshness and Performance**:
-
- Don't cache too long if data changes often
- Don't cache too short if data is static
- Consider your application's needs
diff --git a/apps/website/docs/guide/04-caching/05-revalidateTag-function.mdx b/apps/website/docs/guide/04-caching/05-revalidateTag-function.mdx
index e36039ed..1f6cd6b4 100644
--- a/apps/website/docs/guide/04-caching/05-revalidateTag-function.mdx
+++ b/apps/website/docs/guide/04-caching/05-revalidateTag-function.mdx
@@ -66,13 +66,11 @@ setInterval(
## Best Practices
1. **Strategic Invalidation**:
-
- Invalidate only what needs to be refreshed
- Use specific tags for targeted invalidation
- Consider the impact on performance
2. **Timing**:
-
- Invalidate after data changes
- Consider using scheduled revalidation
- Balance freshness and performance
diff --git a/apps/website/docs/guide/04-caching/06-cleanup-function.mdx b/apps/website/docs/guide/04-caching/06-cleanup-function.mdx
index 81155258..5cf46b14 100644
--- a/apps/website/docs/guide/04-caching/06-cleanup-function.mdx
+++ b/apps/website/docs/guide/04-caching/06-cleanup-function.mdx
@@ -66,13 +66,11 @@ async function performConservativeCleanup() {
## Best Practices
1. **Choose Appropriate Time Period**:
-
- Consider your application's memory constraints
- Balance between memory usage and cache effectiveness
- Monitor cache hit rates
2. **Schedule Regular Cleanup**:
-
- Set up automated cleanup tasks
- Choose appropriate intervals
- Handle cleanup errors gracefully
diff --git a/apps/website/docs/guide/14-useful-utilities/index.mdx b/apps/website/docs/guide/14-useful-utilities/index.mdx
index 2bd7bc6f..bd6d78fa 100644
--- a/apps/website/docs/guide/14-useful-utilities/index.mdx
+++ b/apps/website/docs/guide/14-useful-utilities/index.mdx
@@ -156,7 +156,6 @@ try {
## Best Practices
1. **Choose the right tool**: Think about what you're trying to achieve:
-
- Need to limit how often something happens? Use a rate limiter
- Need to ensure only one thing accesses a resource? Use a mutex
- Need to limit how many things happen at once? Use a semaphore
diff --git a/package.json b/package.json
index 6cbbc041..c881a3ef 100644
--- a/package.json
+++ b/package.json
@@ -14,11 +14,11 @@
"publish-package": "pnpm publish-package",
"build-docs": "pnpm run --filter=\"./apps/website\" build",
"docgen": "tsx ./scripts/docs/generate-typescript-docs.ts && pnpm format",
- "format": "prettier --write ./ --ignore-path=.prettierignore"
+ "format": "prettier --experimental-cli --write ./ --ignore-path=.prettierignore"
},
"devDependencies": {
"@types/node": "^22.10.2",
- "prettier": "^3.0.3",
+ "prettier": "^3.6.0",
"tsx": "^4.7.0",
"turbo": "^2.5.3"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e4e5429f..a822837b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -49,7 +49,7 @@ importers:
specifier: ^22.10.2
version: 22.15.32
prettier:
- specifier: ^3.0.3
+ specifier: ^3.6.0
version: 3.6.0
tsx:
specifier: ^4.7.0