Improve OtherClients load messages

This commit is contained in:
Him188 2021-01-26 12:42:11 +08:00
parent 596a295905
commit 544006b0e7

View File

@ -290,7 +290,11 @@ internal class QQAndroidBotNetworkHandler(coroutineContext: CoroutineContext, bo
bot.otherClients.delegate.clear()
bot.otherClients.delegate.addAll(list.map { bot.createOtherClient(it) })
bot.logger.info { "Online OtherClients: " + bot.otherClients.joinToString { "${it.deviceName}(${it.platform?.name ?: "unknown platform"})" } }
if (bot.otherClients.isEmpty()) {
bot.logger.info { "No OtherClient online." }
} else {
bot.logger.info { "Online OtherClients: " + bot.otherClients.joinToString { "${it.deviceName}(${it.platform?.name ?: "unknown platform"})" } }
}
}
// caches