🐛 try not to die.

This commit is contained in:
jerry
2018-11-28 15:43:04 +08:00
parent a8c856d816
commit 04518bb4a6
2 changed files with 10 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ class CQUtil
public static function loadAllFiles() {
Cache::set("info_level", settings()["info_level"]);
Console::debug("loading configs...");
Console::info("loading configs...");
self::initEmptyCaches();
Cache::set("mods", self::getMods());//加载的模块列表
Cache::set("group_list", DP::getJsonData("group_list.json"));//获取群组列表
@@ -344,9 +344,11 @@ class CQUtil
if (!in_array($v->getQQ(), $robots))
$robots[] = $v->getQQ();
}
if ((Cache::get("bots") ?? []) != []) {
foreach (Cache::get("bots") as $v) {
$robots[] = $v;
}
}
return in_array($user_id, $robots);
}