mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
♻ 重命名服务导入类名称
`AppsManager` → `ServicesManager`
This commit is contained in:
parent
a714fa3ebd
commit
542a2a1fab
10
main.py
10
main.py
@ -8,7 +8,7 @@ from telegram.warnings import PTBUserWarning
|
||||
from config import config
|
||||
from logger import Log
|
||||
from utils.aiobrowser import AioBrowser
|
||||
from utils.apps.manager import AppsManager
|
||||
from utils.apps.manager import ServicesManager
|
||||
from utils.job.register import register_job
|
||||
from utils.mysql import MySQL
|
||||
from utils.plugins.register import register_plugin_handlers
|
||||
@ -37,10 +37,10 @@ def main() -> None:
|
||||
|
||||
# 传入服务并启动
|
||||
Log.info("正在启动服务")
|
||||
apps = AppsManager(mysql, redis, browser)
|
||||
apps.refresh_list("./apps/*")
|
||||
apps.import_module()
|
||||
apps.add_service()
|
||||
services = ServicesManager(mysql, redis, browser)
|
||||
services.refresh_list("./apps/*")
|
||||
services.import_module()
|
||||
services.add_service()
|
||||
|
||||
# 构建BOT
|
||||
Log.info("构建BOT")
|
||||
|
@ -26,7 +26,7 @@ def listener_service():
|
||||
return decorator
|
||||
|
||||
|
||||
class AppsManager:
|
||||
class ServicesManager:
|
||||
def __init__(self, mysql: MySQL, redis: RedisDB, browser: AioBrowser):
|
||||
self.browser = browser
|
||||
self.redis = redis
|
||||
|
Loading…
Reference in New Issue
Block a user