diff --git a/backend/mirai-console/src/command/SimpleCommand.kt b/backend/mirai-console/src/command/SimpleCommand.kt index cc3c24964..eb1e1d51b 100644 --- a/backend/mirai-console/src/command/SimpleCommand.kt +++ b/backend/mirai-console/src/command/SimpleCommand.kt @@ -34,8 +34,7 @@ import kotlin.annotation.AnnotationTarget.VALUE_PARAMETER * ``` * object MySimpleCommand : SimpleCommand( * MyPlugin, "tell", - * description = "Message somebody", - * usage = "/tell <target> <message>" // usage 如不设置则自动根据带有 @Handler 的方法生成 + * description = "Message somebody" * ) { * @Handler * suspend fun CommandSender.onCommand(target: User, message: String) { diff --git a/docs/Commands.md b/docs/Commands.md index 33a77c260..0dbe1f6bc 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -126,8 +126,7 @@ Mirai Console 内建 [`SimpleCommand`] 与 [`CompositeCommand`] 拥有 [`Command ```kotlin object MySimpleCommand : SimpleCommand( MyPluginMain, "tell", "私聊", - description = "Tell somebody privately", - usage = "/tell <target> <message>", // usage 如不设置则自动根据带有 @Handler 的方法生成 + description = "Tell somebody privately" ) { @Handler // 标记这是指令处理器 // 函数名随意 suspend fun CommandSender.handle(target: User, message: String) { // 这两个参数会被作为指令参数要求