aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/easter
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-05-25 10:34:52 +0100
committerGravatar GitHub <[email protected]>2020-05-25 10:34:52 +0100
commitbb30d2904b4a3273d4b10dc9548c542d65f0c379 (patch)
treee6bf89e968dd39a153227aa8ca060496d2c3cbec /bot/exts/easter
parentMerge pull request #401 from fuzzmz/minesweeper-disabled-dm-handling (diff)
parentRemove accidental extra word from docstring (diff)
Merge pull request #413 from jodth07/encoding_bug_fix
Encoding bug fix
Diffstat (limited to 'bot/exts/easter')
-rw-r--r--bot/exts/easter/april_fools_vids.py2
-rw-r--r--bot/exts/easter/egg_decorating.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/easter/april_fools_vids.py b/bot/exts/easter/april_fools_vids.py
index 06108f02..efe7e677 100644
--- a/bot/exts/easter/april_fools_vids.py
+++ b/bot/exts/easter/april_fools_vids.py
@@ -20,7 +20,7 @@ class AprilFoolVideos(commands.Cog):
def load_json() -> dict:
"""A function to load JSON data."""
p = Path('bot/resources/easter/april_fools_vids.json')
- with p.open() as json_file:
+ with p.open(encoding="utf-8") as json_file:
all_vids = load(json_file)
return all_vids
diff --git a/bot/exts/easter/egg_decorating.py b/bot/exts/easter/egg_decorating.py
index be228b2c..b18e6636 100644
--- a/bot/exts/easter/egg_decorating.py
+++ b/bot/exts/easter/egg_decorating.py
@@ -12,10 +12,10 @@ from discord.ext import commands
log = logging.getLogger(__name__)
-with open(Path("bot/resources/evergreen/html_colours.json")) as f:
+with open(Path("bot/resources/evergreen/html_colours.json"), encoding="utf8") as f:
HTML_COLOURS = json.load(f)
-with open(Path("bot/resources/evergreen/xkcd_colours.json")) as f:
+with open(Path("bot/resources/evergreen/xkcd_colours.json"), encoding="utf8") as f:
XKCD_COLOURS = json.load(f)
COLOURS = [