Commit 680f452c authored by Him188's avatar Him188

Fix ambiguous function name

parent 08bdf821
...@@ -124,7 +124,7 @@ class CommandBuilder internal constructor() { ...@@ -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() return CommandBuilder().apply(builder).register()
} }
...@@ -117,7 +117,7 @@ object MiraiConsole { ...@@ -117,7 +117,7 @@ object MiraiConsole {
*/ */
object DefaultCommands { object DefaultCommands {
operator fun invoke() { operator fun invoke() {
buildCommand { registerCommand {
name = "login" name = "login"
description = "Mirai-Console default bot login command" description = "Mirai-Console default bot login command"
onCommand { onCommand {
...@@ -170,7 +170,7 @@ object MiraiConsole { ...@@ -170,7 +170,7 @@ object MiraiConsole {
} }
} }
buildCommand { registerCommand {
name = "status" name = "status"
description = "Mirai-Console default status command" description = "Mirai-Console default status command"
onCommand { onCommand {
...@@ -197,7 +197,7 @@ object MiraiConsole { ...@@ -197,7 +197,7 @@ object MiraiConsole {
} }
buildCommand { registerCommand {
name = "say" name = "say"
description = "Mirai-Console default say command" description = "Mirai-Console default say command"
onCommand { onCommand {
...@@ -236,7 +236,7 @@ object MiraiConsole { ...@@ -236,7 +236,7 @@ object MiraiConsole {
} }
buildCommand { registerCommand {
name = "plugins" name = "plugins"
alias = listOf("plugin") alias = listOf("plugin")
description = "show all plugins" description = "show all plugins"
...@@ -251,7 +251,7 @@ object MiraiConsole { ...@@ -251,7 +251,7 @@ object MiraiConsole {
} }
} }
buildCommand { registerCommand {
name = "command" name = "command"
alias = listOf("commands", "help", "helps") alias = listOf("commands", "help", "helps")
description = "show all commands" description = "show all commands"
...@@ -266,7 +266,7 @@ object MiraiConsole { ...@@ -266,7 +266,7 @@ object MiraiConsole {
} }
} }
buildCommand { registerCommand {
name = "about" name = "about"
description = "About Mirai-Console" description = "About Mirai-Console"
onCommand { onCommand {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment