mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-07-01 04:47:24 +00:00
fix: 修复因某一个机器人启动失败而导致整个程序崩溃.
改动之后, 将容忍机器人的启动失败, 而不会因此异常退出程序.
This commit is contained in:
@ -62,7 +62,11 @@ internal class Launcher : AutoCloseable {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for (botConfig in botConfigs) {
|
for (botConfig in botConfigs) {
|
||||||
launchBot(botConfig)
|
try {
|
||||||
|
launchBot(botConfig)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
log.error(e) { "机器人 `${botConfig.account.name}` 启动时发生错误." }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user