mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Close all bots in console stopping
This commit is contained in:
parent
fa7d688467
commit
34135b5a4d
@ -131,6 +131,7 @@ public object BuiltInCommands {
|
||||
if (!MiraiConsole.isActive) return@withLock
|
||||
sendMessage("Stopping mirai-console")
|
||||
kotlin.runCatching {
|
||||
Bot.instances.forEach { it.closeAndJoin() }
|
||||
MiraiConsole.job.cancelAndJoin()
|
||||
}.fold(
|
||||
onSuccess = {
|
||||
|
Loading…
Reference in New Issue
Block a user