mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 15:36:44 +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 config import config
|
||||||
from logger import Log
|
from logger import Log
|
||||||
from utils.aiobrowser import AioBrowser
|
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.job.register import register_job
|
||||||
from utils.mysql import MySQL
|
from utils.mysql import MySQL
|
||||||
from utils.plugins.register import register_plugin_handlers
|
from utils.plugins.register import register_plugin_handlers
|
||||||
@ -37,10 +37,10 @@ def main() -> None:
|
|||||||
|
|
||||||
# 传入服务并启动
|
# 传入服务并启动
|
||||||
Log.info("正在启动服务")
|
Log.info("正在启动服务")
|
||||||
apps = AppsManager(mysql, redis, browser)
|
services = ServicesManager(mysql, redis, browser)
|
||||||
apps.refresh_list("./apps/*")
|
services.refresh_list("./apps/*")
|
||||||
apps.import_module()
|
services.import_module()
|
||||||
apps.add_service()
|
services.add_service()
|
||||||
|
|
||||||
# 构建BOT
|
# 构建BOT
|
||||||
Log.info("构建BOT")
|
Log.info("构建BOT")
|
||||||
|
@ -26,7 +26,7 @@ def listener_service():
|
|||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
class AppsManager:
|
class ServicesManager:
|
||||||
def __init__(self, mysql: MySQL, redis: RedisDB, browser: AioBrowser):
|
def __init__(self, mysql: MySQL, redis: RedisDB, browser: AioBrowser):
|
||||||
self.browser = browser
|
self.browser = browser
|
||||||
self.redis = redis
|
self.redis = redis
|
||||||
|
Loading…
Reference in New Issue
Block a user