mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-30 06:37:29 +00:00
fix: 修复因某一个机器人启动失败而导致整个程序崩溃.
改动之后, 将容忍机器人的启动失败, 而不会因此异常退出程序.
This commit is contained in:
parent
84b67c7f89
commit
a0344f251f
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user