diff options
author | 2021-05-11 15:32:30 -0300 | |
---|---|---|
committer | 2021-05-11 15:32:30 -0300 | |
commit | febe3e7d5fea74ed939b903306e552177b2c61c2 (patch) | |
tree | 00bcc8a45dddd9cfad1b21f9853ea5c185a5123b /bot/exts/evergreen/trivia_quiz.py | |
parent | fix copy paste error (diff) |
fix unicode corruption errors by encoding to utf-8
Diffstat (limited to 'bot/exts/evergreen/trivia_quiz.py')
-rw-r--r-- | bot/exts/evergreen/trivia_quiz.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py index 94d9e374..7fdd3f5f 100644 --- a/bot/exts/evergreen/trivia_quiz.py +++ b/bot/exts/evergreen/trivia_quiz.py @@ -10,9 +10,7 @@ import discord from discord.ext import commands from fuzzywuzzy import fuzz -from bot.constants import Colours -from bot.constants import NEGATIVE_REPLIES -from bot.constants import Roles +from bot.constants import Colours, NEGATIVE_REPLIES, Roles logger = logging.getLogger(__name__) @@ -210,7 +208,7 @@ class TriviaQuiz(commands.Cog): """Load the questions from the JSON file.""" p = Path("bot", "resources", "evergreen", "trivia_quiz.json") - return json.loads(p.read_text()) + return json.loads(p.read_text(encoding="utf-8")) @commands.group(name="quiz", aliases=["trivia"], invoke_without_command=True) async def quiz_game(self, ctx: commands.Context, category: Optional[str], questions: Optional[int]) -> None: |