♻ 梅开二度之重命名核心模块路径

`apps` → `core`
This commit is contained in:
洛水居室 2022-08-06 20:37:41 +08:00
parent d1876c4c77
commit 602ce67e41
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
51 changed files with 41 additions and 41 deletions

View File

@ -2,7 +2,7 @@ import datetime
from telegram.ext import CallbackContext, JobQueue from telegram.ext import CallbackContext, JobQueue
from apps.cookies.services import PublicCookiesService from core.cookies.services import PublicCookiesService
from logger import Log from logger import Log
from utils.job.manager import listener_jobs_class from utils.job.manager import listener_jobs_class
from utils.service.inject import inject from utils.service.inject import inject

View File

@ -7,11 +7,11 @@ from telegram.constants import ParseMode
from telegram.error import BadRequest, Forbidden from telegram.error import BadRequest, Forbidden
from telegram.ext import CallbackContext, JobQueue from telegram.ext import CallbackContext, JobQueue
from apps.cookies import CookiesService
from apps.sign.models import SignStatusEnum
from apps.sign.services import SignServices
from apps.user import UserService
from config import config from config import config
from core.cookies import CookiesService
from core.sign.models import SignStatusEnum
from core.sign.services import SignServices
from core.user import UserService
from logger import Log from logger import Log
from utils.helpers import get_genshin_client from utils.helpers import get_genshin_client
from utils.job.manager import listener_jobs_class from utils.job.manager import listener_jobs_class

View File

@ -38,7 +38,7 @@ def main() -> None:
# 传入服务并启动 # 传入服务并启动
Log.info("正在启动服务") Log.info("正在启动服务")
services = ServicesManager(mysql, redis, browser) services = ServicesManager(mysql, redis, browser)
services.refresh_list("./apps/*") services.refresh_list("./core/*")
services.import_module() services.import_module()
services.add_service() services.add_service()

View File

@ -3,10 +3,10 @@ from telegram import Update
from telegram.constants import ChatAction from telegram.constants import ChatAction
from telegram.ext import CommandHandler, MessageHandler, filters, CallbackContext from telegram.ext import CommandHandler, MessageHandler, filters, CallbackContext
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.template.services import TemplateService from core.template.services import TemplateService
from apps.user import UserService from core.user import UserService
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.decorators.error import error_callable from utils.decorators.error import error_callable

View File

@ -7,10 +7,10 @@ from telegram import Update, ReplyKeyboardRemove, ReplyKeyboardMarkup, TelegramO
from telegram.ext import CallbackContext, CommandHandler, MessageHandler, filters, ConversationHandler from telegram.ext import CallbackContext, CommandHandler, MessageHandler, filters, ConversationHandler
from telegram.helpers import escape_markdown from telegram.helpers import escape_markdown
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.user.models import User from core.user.models import User
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from apps.user.services import UserService from core.user.services import UserService
from logger import Log from logger import Log
from models.base import RegionEnum from models.base import RegionEnum
from plugins.base import BasePlugins from plugins.base import BasePlugins

View File

@ -2,7 +2,7 @@ from telegram import Update
from telegram.error import BadRequest, Forbidden from telegram.error import BadRequest, Forbidden
from telegram.ext import CallbackContext, CommandHandler from telegram.ext import CallbackContext, CommandHandler
from apps.admin import BotAdminService from core.admin import BotAdminService
from logger import Log from logger import Log
from utils.decorators.admins import bot_admins_rights_check from utils.decorators.admins import bot_admins_rights_check
from utils.plugins.manager import listener_plugins_class from utils.plugins.manager import listener_plugins_class

View File

@ -4,7 +4,7 @@ from telegram import Update, ReplyKeyboardRemove
from telegram.error import BadRequest from telegram.error import BadRequest
from telegram.ext import CallbackContext, ConversationHandler, filters from telegram.ext import CallbackContext, ConversationHandler, filters
from apps.admin.services import BotAdminService from core.admin.services import BotAdminService
from logger import Log from logger import Log
from utils.service.inject import inject from utils.service.inject import inject

View File

@ -8,10 +8,10 @@ from telegram.constants import ChatAction
from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters, \ from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters, \
CallbackContext CallbackContext
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.template.services import TemplateService from core.template.services import TemplateService
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from apps.user.services import UserService from core.user.services import UserService
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.decorators.error import error_callable from utils.decorators.error import error_callable

View File

@ -5,7 +5,7 @@ from telegram import Update
from telegram.constants import ChatAction from telegram.constants import ChatAction
from telegram.ext import filters, CommandHandler, MessageHandler, CallbackContext from telegram.ext import filters, CommandHandler, MessageHandler, CallbackContext
from apps.template import TemplateService from core.template import TemplateService
from logger import Log from logger import Log
from models.apihelper.gacha import GachaInfo from models.apihelper.gacha import GachaInfo
from plugins.base import BasePlugins from plugins.base import BasePlugins

View File

@ -3,8 +3,8 @@ from telegram.constants import ChatAction
from telegram.error import BadRequest from telegram.error import BadRequest
from telegram.ext import CommandHandler, CallbackContext from telegram.ext import CommandHandler, CallbackContext
from apps.template.services import TemplateService
from config import config from config import config
from core.template.services import TemplateService
from logger import Log from logger import Log
from utils.decorators.error import error_callable from utils.decorators.error import error_callable
from utils.decorators.restricts import restricts from utils.decorators.restricts import restricts

View File

@ -6,7 +6,7 @@ from telegram.constants import ParseMode
from telegram.error import BadRequest from telegram.error import BadRequest
from telegram.ext import CallbackContext from telegram.ext import CallbackContext
from apps.wiki import WikiService from core.wiki import WikiService
from logger import Log from logger import Log
from utils.service.inject import inject from utils.service.inject import inject

View File

@ -8,10 +8,10 @@ from telegram import Update
from telegram.constants import ChatAction from telegram.constants import ChatAction
from telegram.ext import CallbackContext, CommandHandler, MessageHandler, ConversationHandler, filters from telegram.ext import CallbackContext, CommandHandler, MessageHandler, ConversationHandler, filters
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.template.services import TemplateService from core.template.services import TemplateService
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from apps.user.services import UserService from core.user.services import UserService
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.bot import get_all_args from utils.bot import get_all_args

View File

@ -5,11 +5,11 @@ from genshin import Game, GenshinException, AlreadyClaimed, Client
from telegram import Update from telegram import Update
from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters, CallbackContext from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters, CallbackContext
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.sign.models import Sign as SignUser, SignStatusEnum from core.sign.models import Sign as SignUser, SignStatusEnum
from apps.sign.services import SignServices from core.sign.services import SignServices
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from apps.user.services import UserService from core.user.services import UserService
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.bot import get_all_args from utils.bot import get_all_args

View File

@ -2,7 +2,7 @@ from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.constants import ChatAction, ParseMode from telegram.constants import ChatAction, ParseMode
from telegram.ext import filters, ConversationHandler, CommandHandler, MessageHandler, CallbackContext from telegram.ext import filters, ConversationHandler, CommandHandler, MessageHandler, CallbackContext
from apps.game.services import GameStrategyService from core.game.services import GameStrategyService
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.bot import get_all_args from utils.bot import get_all_args

View File

@ -7,10 +7,10 @@ from telegram import Update
from telegram.constants import ChatAction from telegram.constants import ChatAction
from telegram.ext import CallbackContext, CommandHandler, MessageHandler, ConversationHandler, filters from telegram.ext import CallbackContext, CommandHandler, MessageHandler, ConversationHandler, filters
from apps.cookies.services import CookiesService from core.cookies.services import CookiesService
from apps.template.services import TemplateService from core.template.services import TemplateService
from apps.user.repositories import UserNotFoundError from core.user.repositories import UserNotFoundError
from apps.user.services import UserService from core.user.services import UserService
from logger import Log from logger import Log
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.decorators.error import error_callable from utils.decorators.error import error_callable

View File

@ -2,8 +2,8 @@ from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.constants import ChatAction from telegram.constants import ChatAction
from telegram.ext import filters, CommandHandler, MessageHandler, CallbackContext from telegram.ext import filters, CommandHandler, MessageHandler, CallbackContext
from apps.template.services import TemplateService from core.template.services import TemplateService
from apps.wiki.services import WikiService from core.wiki.services import WikiService
from logger import Log from logger import Log
from metadata.shortname import weaponToName from metadata.shortname import weaponToName
from plugins.base import BasePlugins from plugins.base import BasePlugins

View File

@ -1,7 +1,7 @@
from telegram import Update from telegram import Update
from telegram.ext import CommandHandler, CallbackContext from telegram.ext import CommandHandler, CallbackContext
from apps.wiki.services import WikiService from core.wiki.services import WikiService
from plugins.base import BasePlugins from plugins.base import BasePlugins
from utils.decorators.admins import bot_admins_rights_check from utils.decorators.admins import bot_admins_rights_check
from utils.decorators.error import error_callable from utils.decorators.error import error_callable

View File

@ -1,7 +1,7 @@
from functools import wraps from functools import wraps
from typing import Callable from typing import Callable
from apps.admin.services import BotAdminService from core.admin.services import BotAdminService
from utils.service.inject import inject from utils.service.inject import inject