aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/trivia_quiz.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen/trivia_quiz.py')
-rw-r--r--bot/exts/evergreen/trivia_quiz.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py
index 1953253b..9db201ef 100644
--- a/bot/exts/evergreen/trivia_quiz.py
+++ b/bot/exts/evergreen/trivia_quiz.py
@@ -41,9 +41,7 @@ class TriviaQuiz(commands.Cog):
def load_questions() -> dict:
"""Load the questions from the JSON file."""
p = Path("bot", "resources", "evergreen", "trivia_quiz.json")
- with p.open(encoding="utf8") as json_data:
- questions = json.load(json_data)
- return questions
+ return json.loads(p.read_text("utf8"))
@commands.group(name="quiz", aliases=["trivia"], invoke_without_command=True)
async def quiz_game(self, ctx: commands.Context, category: str = None) -> None: