mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 12:51:35 +00:00
🐛 修复 quiz
插件依赖的服务为 None
的问题
This commit is contained in:
parent
6aa6d68770
commit
5782035a6f
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user