#1509 try to fix bot is closed manually

This commit is contained in:
RainChan 2021-09-05 17:18:58 +08:00
parent b34dec29ca
commit 93fad9ee1c
No known key found for this signature in database
GPG Key ID: FA8DD6D26D4161B4

View File

@ -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