From a43fb27181c3d753eb3f5efe7ed605b50ae39c9c Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 15 May 2020 00:58:31 +0800 Subject: [PATCH] Fix build --- .../kotlin/net/mamoe/mirai/console/command/Command.kt | 4 ---- .../net/mamoe/mirai/console/command/CommandManager.kt | 10 +++++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt index fd650dff1..ad1d3e7e5 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt @@ -38,10 +38,6 @@ interface Command { */ } -internal fun Command.matchChild(args: List): SubCommandDescriptor { - -} - /** * 解析完成的指令实际参数列表. 参数顺序与 [Command.descriptor] 的 [CommandDescriptor.params] 相同. diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt index ec319625a..5437efa82 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt @@ -73,7 +73,8 @@ fun Command.unregister(): Boolean = InternalCommandManager.modifyLock.withLock { suspend fun CommandSender.executeCommand(vararg args: Any): Boolean { val command = InternalCommandManager.matchCommand(args[0].toString()) ?: return false - return args.flattenCommandComponents().executeCommand(this) + TODO() + //return args.flattenCommandComponents().executeCommand(this) } /** @@ -81,7 +82,8 @@ suspend fun CommandSender.executeCommand(vararg args: Any): Boolean { * @return 是否成功解析到指令. 返回 `false` 代表无任何指令匹配 */ suspend fun MessageChain.executeAsCommand(sender: CommandSender): Boolean { - return this.flattenCommandComponents().executeCommand(sender) + TODO() +/// return this.flattenCommandComponents().executeCommand(sender) } /** @@ -95,7 +97,9 @@ suspend inline fun CommandSender.execute(command: CommandDescriptor.SubCommandDe /** * 检查指令参数并直接执行一个指令. */ -suspend inline fun Command.execute(sender: CommandSender, args: CommandArgs): Boolean = sender.execute(this, args) +suspend inline fun Command.execute(sender: CommandSender, args: CommandArgs): Boolean = + TODO() +//sender.execute(this, args) /** * 核心执行指令