Commit a126e3f6 authored by jiahua.liu's avatar jiahua.liu

print usage

parent 4a026481
...@@ -159,7 +159,7 @@ object MiraiConsole { ...@@ -159,7 +159,7 @@ object MiraiConsole {
commandStr = "/$commandStr" commandStr = "/$commandStr"
} }
if (!CommandManager.runCommand(command.sender, commandStr)) { if (!CommandManager.runCommand(command.sender, commandStr)) {
logger("未知指令 $commandStr") command.sender.sendMessage("未知指令 $commandStr")
} }
} }
} }
......
...@@ -74,6 +74,8 @@ object CommandManager { ...@@ -74,6 +74,8 @@ object CommandManager {
) )
) { ) {
PluginManager.onCommand(this, args) PluginManager.onCommand(this, args)
} else {
sender.sendMessage(this.usage)
} }
} catch (e: Exception) { } catch (e: Exception) {
sender.sendMessage("在运行指令时出现了未知错误") sender.sendMessage("在运行指令时出现了未知错误")
......
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