diff --git a/backend/mirai-console/src/internal/command/CommandReflector.kt b/backend/mirai-console/src/internal/command/CommandReflector.kt index 1bf73d773..867c50ec3 100644 --- a/backend/mirai-console/src/internal/command/CommandReflector.kt +++ b/backend/mirai-console/src/internal/command/CommandReflector.kt @@ -174,7 +174,8 @@ internal class CommandReflector( is AbstractCommandValueParameter.Extended, is AbstractCommandValueParameter.UserDefinedType<*>, -> { - "<${this.name ?: this.type.classifierAsKClass().simpleName}>" + val nameToRender = this.name ?: this.type.classifierAsKClass().simpleName + if (isOptional) "[$nameToRender]" else "<$nameToRender>" } is AbstractCommandValueParameter.StringConstant -> { this.expectingValue