From 0c94ea96a8c02158d735f262db169da53fc3a6c4 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 9 Sep 2020 22:54:47 +0800 Subject: [PATCH] Fix generated usage --- .../mirai/console/internal/command/CompositeCommandInternal.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt index 4251131ed..b427d982e 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt @@ -234,7 +234,7 @@ internal fun Array.createUsage(b internal fun AbstractReflectionCommand.SubCommandDescriptor.createUsage(baseCommand: AbstractReflectionCommand): String = buildString { - if (!baseCommand.prefixOptional) { + if (baseCommand.prefixOptional) { append("(") append(CommandManager.commandPrefix) append(")")