mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-26 02:11:03 +00:00
🐛 Fix to get the question id
梅开二度
This commit is contained in:
parent
6e8f29786e
commit
884afa3087
@ -36,8 +36,8 @@ class QuizPlugin(Plugin, BasePlugin):
|
|||||||
return None
|
return None
|
||||||
if len(question_id_list) == 0:
|
if len(question_id_list) == 0:
|
||||||
return None
|
return None
|
||||||
index = random.choice(question_id_list) # nosec
|
question_id = random.choice(question_id_list) # nosec
|
||||||
question = await self.quiz_service.get_question(question_id_list[index])
|
question = await self.quiz_service.get_question(question_id)
|
||||||
_options = []
|
_options = []
|
||||||
correct_option = None
|
correct_option = None
|
||||||
for answer in question.answers:
|
for answer in question.answers:
|
||||||
|
Loading…
Reference in New Issue
Block a user