From 91b924ad111e7be3024b87ae2ddb41901920b85f Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 26 Aug 2020 22:51:34 +0800 Subject: [PATCH] Improve Help command --- .../net/mamoe/mirai/console/command/BuiltInCommands.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt index 43457b588..0c1204cdb 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt @@ -91,9 +91,10 @@ public object BuiltInCommands { ), BuiltInCommand { @Handler public suspend fun CommandSender.handle() { - sendMessage(allRegisteredCommands.joinToString { - it.usage + "\n\n" - }) + sendMessage( + allRegisteredCommands.joinToString("\n\n") { "◆ ${it.usage}" }.lines().filterNot(String::isBlank) + .joinToString("\n") + ) } }