Commit d95e6324 authored by nanahira's avatar nanahira

CommandUsage

parent 6953df0b
......@@ -311,7 +311,7 @@ Koishi-Nest 使用一组装饰器进行描述指令的行为。这些装饰器
* `@CommandDescription(text: string)` 指令描述。等价于 `ctx.command(def, desc)` 中的描述。
* `@CommandUsage(text: string)` 指令介绍。等价于 `cmd.usage(text)`
* `@CommandUsage(text: Command.Usage)` 指令介绍。等价于 `cmd.usage(text)`
* `@CommandExample(text: string)` 指令示例。等价于 `cmd.example(text)`
......@@ -555,6 +555,10 @@ export class AppModule {}
## 更新历史
### 4.2.1
* 调整了 `@CommandUsage` 的类型。
### 4.2.0
* 适配新版 Koishi 。
......
......@@ -220,7 +220,7 @@ export const CommandShortcut = (
config: Command.Shortcut = {},
) => CommandDef((cmd) => cmd.shortcut(name, config));
export const CommandUsage = (text: string) =>
export const CommandUsage = (text: Command.Usage) =>
CommandDef((cmd) => cmd.usage(text));
export const CommandExample = (text: string) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment