mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-23 00:01:45 +00:00
🔧 修复初始化时使用了错误的包路径引发的错误
This commit is contained in:
parent
4e696eddad
commit
72b73be299
@ -3,10 +3,10 @@ from typing import List
|
|||||||
from pymysql import IntegrityError
|
from pymysql import IntegrityError
|
||||||
from telegram import Bot
|
from telegram import Bot
|
||||||
|
|
||||||
from cache import BotAdminCache, GroupAdminCache
|
|
||||||
from config import config
|
from config import config
|
||||||
from logger import Log
|
from logger import Log
|
||||||
from repositories import BotAdminRepository
|
from .cache import BotAdminCache, GroupAdminCache
|
||||||
|
from .repositories import BotAdminRepository
|
||||||
|
|
||||||
|
|
||||||
class BotAdminService:
|
class BotAdminService:
|
||||||
|
2
main.py
2
main.py
@ -4,11 +4,11 @@ from warnings import filterwarnings
|
|||||||
import pytz
|
import pytz
|
||||||
from telegram.ext import Application, Defaults
|
from telegram.ext import Application, Defaults
|
||||||
from telegram.warnings import PTBUserWarning
|
from telegram.warnings import PTBUserWarning
|
||||||
from utils.app.manager import AppsManager
|
|
||||||
|
|
||||||
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.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
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import inspect
|
import inspect
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from utils.app.manager import ServiceDict
|
|
||||||
|
|
||||||
from logger import Log
|
from logger import Log
|
||||||
from models.types import Func
|
from models.types import Func
|
||||||
|
from utils.apps.manager import ServiceDict
|
||||||
|
|
||||||
|
|
||||||
def get_injections(func: Func):
|
def get_injections(func: Func):
|
||||||
|
@ -54,7 +54,7 @@ class AppsManager:
|
|||||||
for app_name in self.app_list:
|
for app_name in self.app_list:
|
||||||
if app_name not in self.exclude_list:
|
if app_name not in self.exclude_list:
|
||||||
try:
|
try:
|
||||||
import_module(f"app.{app_name}")
|
import_module(f"apps.{app_name}")
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
Log.warning(f"Service模块 {app_name} 导入失败", exc)
|
Log.warning(f"Service模块 {app_name} 导入失败", exc)
|
||||||
except ImportWarning as exc:
|
except ImportWarning as exc:
|
||||||
|
Loading…
Reference in New Issue
Block a user