feat(launch): 对配置中没有启用任何机器人的情况输出警告.

增加对没有启用任何机器人时候的一个警告信息, 以防止被误认为无响应退出.
This commit is contained in:
LamGC 2022-05-02 02:20:19 +08:00
parent e8b746b3f8
commit 77b7a7cd08
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -80,6 +80,9 @@ internal class Launcher : AutoCloseable {
if (botConfigs.isEmpty()) {
log.warn { "尚未配置任何机器人, 请先配置机器人后再启动本程序." }
return false
} else if (botConfigs.none { it.enabled }) {
log.warn { "配置文件中没有已启用的机器人, 请至少启用一个机器人." }
return false
}
for (botConfig in botConfigs) {
try {