mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 09:05:34 +08:00
🐛 try not to die.
This commit is contained in:
@@ -24,7 +24,7 @@ class CQUtil
|
|||||||
|
|
||||||
public static function loadAllFiles() {
|
public static function loadAllFiles() {
|
||||||
Cache::set("info_level", settings()["info_level"]);
|
Cache::set("info_level", settings()["info_level"]);
|
||||||
Console::debug("loading configs...");
|
Console::info("loading configs...");
|
||||||
self::initEmptyCaches();
|
self::initEmptyCaches();
|
||||||
Cache::set("mods", self::getMods());//加载的模块列表
|
Cache::set("mods", self::getMods());//加载的模块列表
|
||||||
Cache::set("group_list", DP::getJsonData("group_list.json"));//获取群组列表
|
Cache::set("group_list", DP::getJsonData("group_list.json"));//获取群组列表
|
||||||
@@ -344,9 +344,11 @@ class CQUtil
|
|||||||
if (!in_array($v->getQQ(), $robots))
|
if (!in_array($v->getQQ(), $robots))
|
||||||
$robots[] = $v->getQQ();
|
$robots[] = $v->getQQ();
|
||||||
}
|
}
|
||||||
|
if ((Cache::get("bots") ?? []) != []) {
|
||||||
foreach (Cache::get("bots") as $v) {
|
foreach (Cache::get("bots") as $v) {
|
||||||
$robots[] = $v;
|
$robots[] = $v;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return in_array($user_id, $robots);
|
return in_array($user_id, $robots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user