mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
command manager fix
This commit is contained in:
parent
87cca55805
commit
da796066c7
@ -62,7 +62,7 @@ object CommandManager : Job by {
|
|||||||
*
|
*
|
||||||
* 返回一个指令是否执行成功
|
* 返回一个指令是否执行成功
|
||||||
*/
|
*/
|
||||||
internal suspend fun processCommand(sender: CommandSender, fullCommand: String):Boolean {
|
private suspend fun processCommand(sender: CommandSender, fullCommand: String):Boolean {
|
||||||
return withContext(commandDispatcher) {
|
return withContext(commandDispatcher) {
|
||||||
_processCommand(sender, fullCommand)
|
_processCommand(sender, fullCommand)
|
||||||
}
|
}
|
||||||
@ -149,7 +149,6 @@ object CommandManager : Job by {
|
|||||||
|
|
||||||
suspend fun dispatchConsoleCommand(command: String):Boolean = dispatchCommand(ConsoleCommandSender,command)
|
suspend fun dispatchConsoleCommand(command: String):Boolean = dispatchCommand(ConsoleCommandSender,command)
|
||||||
|
|
||||||
|
|
||||||
fun dispatchCommandBlocking(sender: CommandSender,command: String):Boolean = runBlocking { dispatchCommand(sender, command) }
|
fun dispatchCommandBlocking(sender: CommandSender,command: String):Boolean = runBlocking { dispatchCommand(sender, command) }
|
||||||
|
|
||||||
fun dispatchConsoleCommandBlocking(command: String):Boolean = runBlocking { dispatchConsoleCommandBlocking(command) }
|
fun dispatchConsoleCommandBlocking(command: String):Boolean = runBlocking { dispatchConsoleCommandBlocking(command) }
|
||||||
|
Loading…
Reference in New Issue
Block a user