PaiGram/core/quiz/__init__.py
洛水居室 3ec99cc3b8
修复 quiz 模块问题并添加验证群验证插件
修复 `quiz` 模块问题并添加验证群验证插件
2022-08-31 14:46:04 +08:00

15 lines
434 B
Python

from utils.mysql import MySQL
from utils.redisdb import RedisDB
from utils.service.manager import listener_service
from .cache import QuizCache
from .repositories import QuizRepository
from .services import QuizService
@listener_service()
def create_quiz_service(mysql: MySQL, redis: RedisDB):
_repository = QuizRepository(mysql)
_cache = QuizCache(redis)
_service = QuizService(_repository, _cache)
return _service