mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-07-03 05:47:24 +00:00
refactor(config): 改进配置读取错误时输出的错误信息.
改进后的信息有助于让用户了解到底发生了什么, 可帮助用户找到出错的配置文件并修复错误的配置格式.
This commit is contained in:
@ -108,7 +108,7 @@ internal class Launcher(private val config: AppConfig = Const.config) : AutoClos
|
||||
|
||||
@Synchronized
|
||||
fun launch(): Boolean {
|
||||
val botConfigs = loadBotConfig()
|
||||
val botConfigs = loadBotConfig() ?: return false
|
||||
if (botConfigs.isEmpty()) {
|
||||
log.warn { "尚未配置任何机器人, 请先配置机器人后再启动本程序." }
|
||||
return false
|
||||
|
Reference in New Issue
Block a user