mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-30 06:37:29 +00:00
feat(launch): 对配置中没有启用任何机器人的情况输出警告.
增加对没有启用任何机器人时候的一个警告信息, 以防止被误认为无响应退出.
This commit is contained in:
parent
e8b746b3f8
commit
77b7a7cd08
@ -80,6 +80,9 @@ internal class Launcher : AutoCloseable {
|
|||||||
if (botConfigs.isEmpty()) {
|
if (botConfigs.isEmpty()) {
|
||||||
log.warn { "尚未配置任何机器人, 请先配置机器人后再启动本程序." }
|
log.warn { "尚未配置任何机器人, 请先配置机器人后再启动本程序." }
|
||||||
return false
|
return false
|
||||||
|
} else if (botConfigs.none { it.enabled }) {
|
||||||
|
log.warn { "配置文件中没有已启用的机器人, 请至少启用一个机器人." }
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
for (botConfig in botConfigs) {
|
for (botConfig in botConfigs) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user