mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-05 07:06:57 +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
|
if (!MiraiConsole.isActive) return@withLock
|
||||||
sendMessage("Stopping mirai-console")
|
sendMessage("Stopping mirai-console")
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
|
Bot.instances.forEach { it.closeAndJoin() }
|
||||||
MiraiConsole.job.cancelAndJoin()
|
MiraiConsole.job.cancelAndJoin()
|
||||||
}.fold(
|
}.fold(
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
|
Loading…
Reference in New Issue
Block a user