mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
♻ 重命名模块路径
`utils.apps` → `utils.service`
This commit is contained in:
parent
91cfcdd0a7
commit
d1876c4c77
@ -1,6 +1,6 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.mysql import MySQL
|
||||
from utils.redisdb import RedisDB
|
||||
from utils.service.manager import listener_service
|
||||
from .cache import BotAdminCache
|
||||
from .repositories import BotAdminRepository
|
||||
from .services import BotAdminService
|
||||
|
@ -1,6 +1,6 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.mysql import MySQL
|
||||
from utils.redisdb import RedisDB
|
||||
from utils.service.manager import listener_service
|
||||
from .cache import PublicCookiesCache
|
||||
from .repositories import CookiesRepository
|
||||
from .services import CookiesService, PublicCookiesService
|
||||
|
@ -1,5 +1,5 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.redisdb import RedisDB
|
||||
from utils.service.manager import listener_service
|
||||
from .cache import GameStrategyCache
|
||||
from .services import GameStrategyService
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.mysql import MySQL
|
||||
from utils.service.manager import listener_service
|
||||
from .repositories import SignRepository
|
||||
from .services import SignServices
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from utils.aiobrowser import AioBrowser
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.service.manager import listener_service
|
||||
from .services import TemplateService
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.mysql import MySQL
|
||||
from utils.service.manager import listener_service
|
||||
from .repositories import UserRepository
|
||||
from .services import UserService
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from utils.apps.manager import listener_service
|
||||
from utils.redisdb import RedisDB
|
||||
from utils.service.manager import listener_service
|
||||
from .cache import WikiCache
|
||||
from .services import WikiService
|
||||
|
||||
|
@ -4,8 +4,8 @@ from telegram.ext import CallbackContext, JobQueue
|
||||
|
||||
from apps.cookies.services import PublicCookiesService
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.job.manager import listener_jobs_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_jobs_class()
|
||||
|
@ -13,9 +13,9 @@ from apps.sign.services import SignServices
|
||||
from apps.user import UserService
|
||||
from config import config
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.helpers import get_genshin_client
|
||||
from utils.job.manager import listener_jobs_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_jobs_class()
|
||||
|
2
main.py
2
main.py
@ -8,11 +8,11 @@ from telegram.warnings import PTBUserWarning
|
||||
from config import config
|
||||
from logger import Log
|
||||
from utils.aiobrowser import AioBrowser
|
||||
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
|
||||
from utils.redisdb import RedisDB
|
||||
from utils.service.manager import ServicesManager
|
||||
|
||||
# 无视相关警告
|
||||
# 该警告说明在官方GITHUB的WIKI中Frequently Asked Questions里的What do the per_* settings in ConversationHandler do?
|
||||
|
@ -9,11 +9,11 @@ from apps.user import UserService
|
||||
from apps.user.repositories import UserNotFoundError
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import get_genshin_client, url_to_file
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -14,10 +14,10 @@ from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from models.base import RegionEnum
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
class AddUserCommandData(TelegramObject):
|
||||
|
@ -4,9 +4,9 @@ from telegram.ext import CallbackContext, CommandHandler
|
||||
|
||||
from apps.admin import BotAdminService
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.admins import bot_admins_rights_check
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -6,7 +6,7 @@ from telegram.ext import CallbackContext, ConversationHandler, filters
|
||||
|
||||
from apps.admin.services import BotAdminService
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
async def clean_message(context: CallbackContext, chat_id: int, message_id: int) -> bool:
|
||||
|
@ -14,11 +14,11 @@ from apps.user.repositories import UserNotFoundError
|
||||
from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import get_genshin_client
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -10,11 +10,11 @@ from logger import Log
|
||||
from models.apihelper.gacha import GachaInfo
|
||||
from plugins.base import BasePlugins
|
||||
from plugins.gacha.wish import WishCountInfo, get_one
|
||||
from utils.apps.inject import inject
|
||||
from utils.bot import get_all_args
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -6,10 +6,10 @@ from telegram.ext import CommandHandler, CallbackContext
|
||||
from apps.template.services import TemplateService
|
||||
from config import config
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -8,7 +8,7 @@ from telegram.ext import CallbackContext
|
||||
|
||||
from apps.wiki import WikiService
|
||||
from logger import Log
|
||||
from utils.apps.inject import inject
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
class Inline:
|
||||
|
@ -14,12 +14,12 @@ from apps.user.repositories import UserNotFoundError
|
||||
from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.bot import get_all_args
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import get_genshin_client
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
def check_ledger_month(context: CallbackContext) -> int:
|
||||
|
@ -6,18 +6,18 @@ from telegram import Update
|
||||
from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters, CallbackContext
|
||||
|
||||
from apps.cookies.services import CookiesService
|
||||
from apps.sign.services import SignServices
|
||||
from apps.sign.models import Sign as SignUser, SignStatusEnum
|
||||
from apps.sign.services import SignServices
|
||||
from apps.user.repositories import UserNotFoundError
|
||||
from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.bot import get_all_args
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import get_genshin_client
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -5,12 +5,12 @@ from telegram.ext import filters, ConversationHandler, CommandHandler, MessageHa
|
||||
from apps.game.services import GameStrategyService
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.bot import get_all_args
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import url_to_file
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -13,11 +13,11 @@ from apps.user.repositories import UserNotFoundError
|
||||
from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import url_to_file, get_genshin_client
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -7,12 +7,12 @@ from apps.wiki.services import WikiService
|
||||
from logger import Log
|
||||
from metadata.shortname import weaponToName
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.bot import get_all_args
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.decorators.restricts import restricts
|
||||
from utils.helpers import url_to_file
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -3,10 +3,10 @@ from telegram.ext import CommandHandler, CallbackContext
|
||||
|
||||
from apps.wiki.services import WikiService
|
||||
from plugins.base import BasePlugins
|
||||
from utils.apps.inject import inject
|
||||
from utils.decorators.admins import bot_admins_rights_check
|
||||
from utils.decorators.error import error_callable
|
||||
from utils.plugins.manager import listener_plugins_class
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
@listener_plugins_class()
|
||||
|
@ -2,7 +2,7 @@ from functools import wraps
|
||||
from typing import Callable
|
||||
|
||||
from apps.admin.services import BotAdminService
|
||||
from utils.apps.inject import inject
|
||||
from utils.service.inject import inject
|
||||
|
||||
|
||||
def bot_admins_rights_check(func: Callable) -> Callable:
|
||||
|
@ -7,9 +7,9 @@ import genshin
|
||||
import httpx
|
||||
from genshin import Client, types
|
||||
from httpx import UnsupportedProtocol
|
||||
from service.cookies.services import CookiesService
|
||||
from service.user.services import UserService
|
||||
|
||||
from apps.cookies.services import CookiesService
|
||||
from apps.user.services import UserService
|
||||
from logger import Log
|
||||
from models.base import RegionEnum
|
||||
|
||||
|
@ -3,7 +3,7 @@ from functools import wraps
|
||||
|
||||
from logger import Log
|
||||
from models.types import Func
|
||||
from utils.apps.manager import ServiceDict
|
||||
from utils.service.manager import ServiceDict
|
||||
|
||||
|
||||
def get_injections(func: Func):
|
Loading…
Reference in New Issue
Block a user