aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/halloweenify.py
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-05-13 13:34:06 -0400
committerGravatar ToxicKidz <[email protected]>2021-05-13 13:34:06 -0400
commit2aa1916d5c8e4832f26f6da4094238e9a0021d1c (patch)
tree2ce3195a019ef84fd0b2d6509f5deec7b25e19bc /bot/exts/halloween/halloweenify.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/halloween/halloweenify.py')
-rw-r--r--bot/exts/halloween/halloweenify.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/halloween/halloweenify.py b/bot/exts/halloween/halloweenify.py
index df55b55d..e839950a 100644
--- a/bot/exts/halloween/halloweenify.py
+++ b/bot/exts/halloween/halloweenify.py
@@ -1,5 +1,5 @@
import logging
-from json import load
+from json import loads
from pathlib import Path
from random import choice
@@ -21,8 +21,7 @@ class Halloweenify(commands.Cog):
async def halloweenify(self, ctx: commands.Context) -> None:
"""Change your nickname into a much spookier one!"""
async with ctx.typing():
- with open(Path("bot/resources/halloween/halloweenify.json"), "r", encoding="utf8") as f:
- data = load(f)
+ data = loads(Path("bot/resources/halloween/halloweenify.json").read_text("utf8"))
# Choose a random character from our list we loaded above and set apart the nickname and image url.
character = choice(data["characters"])