From 884afa3087d67319d6c4709ce6a9f513921c914a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Fri, 28 Oct 2022 17:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20to=20get=20the=20`question?= =?UTF-8?q?=20id`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 梅开二度 --- plugins/genshin/quiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/genshin/quiz.py b/plugins/genshin/quiz.py index b6d289a4..f681fa4f 100644 --- a/plugins/genshin/quiz.py +++ b/plugins/genshin/quiz.py @@ -36,8 +36,8 @@ class QuizPlugin(Plugin, BasePlugin): return None if len(question_id_list) == 0: return None - index = random.choice(question_id_list) # nosec - question = await self.quiz_service.get_question(question_id_list[index]) + question_id = random.choice(question_id_list) # nosec + question = await self.quiz_service.get_question(question_id) _options = [] correct_option = None for answer in question.answers: