2
0
Эх сурвалжийг харах

#1509 try to fix bot is closed manually

RainChan 4 жил өмнө
parent
commit
b822c045d5

+ 2 - 1
mirai-core/src/commonMain/kotlin/QQAndroidBot.kt

@@ -132,7 +132,8 @@ internal open class QQAndroidBot constructor(
                     cause is NetworkException && cause.recoverable -> {
                         eventDispatcher.broadcastAsync(BotOfflineEvent.Dropped(bot, cause))
                     }
-                    cause is BotClosedByEvent -> {
+                    cause == null ->{
+                        eventDispatcher.broadcastAsync(BotOfflineEvent.Dropped(bot, null))
                     }
                     else -> {
                         // any other unexpected exceptions considered as an error