From 680f452cae8ce99ddb5c48d438b785271ac4493c Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 18 Feb 2020 15:01:35 +0800 Subject: [PATCH] Fix ambiguous function name --- .../main/kotlin/net/mamoe/mirai/console/Command.kt | 2 +- .../kotlin/net/mamoe/mirai/console/MiraiConsole.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/Command.kt b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/Command.kt index 2ec3f6a8e..a62131712 100644 --- a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/Command.kt +++ b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/Command.kt @@ -124,7 +124,7 @@ class CommandBuilder internal constructor() { } } -fun buildCommand(builder: CommandBuilder.() -> Unit): ICommand { +fun registerCommand(builder: CommandBuilder.() -> Unit): ICommand { return CommandBuilder().apply(builder).register() } diff --git a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt index c87126215..66aa8a304 100644 --- a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt +++ b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt @@ -117,7 +117,7 @@ object MiraiConsole { */ object DefaultCommands { operator fun invoke() { - buildCommand { + registerCommand { name = "login" description = "Mirai-Console default bot login command" onCommand { @@ -170,7 +170,7 @@ object MiraiConsole { } } - buildCommand { + registerCommand { name = "status" description = "Mirai-Console default status command" onCommand { @@ -197,7 +197,7 @@ object MiraiConsole { } - buildCommand { + registerCommand { name = "say" description = "Mirai-Console default say command" onCommand { @@ -236,7 +236,7 @@ object MiraiConsole { } - buildCommand { + registerCommand { name = "plugins" alias = listOf("plugin") description = "show all plugins" @@ -251,7 +251,7 @@ object MiraiConsole { } } - buildCommand { + registerCommand { name = "command" alias = listOf("commands", "help", "helps") description = "show all commands" @@ -266,7 +266,7 @@ object MiraiConsole { } } - buildCommand { + registerCommand { name = "about" description = "About Mirai-Console" onCommand {