🐛 修复 quiz 插件依赖的服务为 None 的问题

This commit is contained in:
洛水居室 2022-08-31 16:29:18 +08:00
parent 6aa6d68770
commit 5782035a6f
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -17,6 +17,7 @@ from plugins.base import BasePlugins
from utils.decorators.restricts import restricts
from utils.plugins.manager import listener_plugins_class
from utils.random import MT19937_Random
from utils.service.inject import inject
class QuizCommandData:
@ -37,6 +38,7 @@ class QuizPlugin(BasePlugins):
GET_NEW_QUESTION, GET_NEW_CORRECT_ANSWER, GET_NEW_WRONG_ANSWER, \
QUESTION_EDIT, SAVE_QUESTION = range(10300, 10308)
@inject
def __init__(self, quiz_service: QuizService = None, bot_admin_service: BotAdminService = None):
self.bot_admin_service = bot_admin_service
self.user_time = {}