refactor: 重构会话封禁功能处理逻辑

This commit is contained in:
RockChinQ
2024-01-24 23:38:13 +08:00
parent f3bcff1261
commit f4ae9df3bf
8 changed files with 109 additions and 95 deletions

View File

@@ -50,7 +50,10 @@ async def make_app() -> app.Application:
# 生成标识符
identifier.init()
cfg_mgr = await config.load_config()
cfg_mgr = await config.load_python_module_config(
"config.py",
"config-template.py"
)
context.set_config_manager(cfg_mgr)
cfg = cfg_mgr.data
@@ -63,7 +66,10 @@ async def make_app() -> app.Application:
if overrided:
qcg_logger.info("以下配置项已使用 override.json 覆盖:" + ",".join(overrided))
tips_mgr = await config.load_tips()
tips_mgr = await config.load_python_module_config(
"tips.py",
"tips-custom-template.py"
)
# 初始化文字转图片
from pkg.utils import text2img
@@ -121,4 +127,5 @@ async def make_app() -> app.Application:
async def main():
app_inst = await make_app()
await app_inst.initialize()
await app_inst.run()