aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/magic_8ball.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/evergreen/magic_8ball.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/evergreen/magic_8ball.py')
-rw-r--r--bot/exts/evergreen/magic_8ball.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/evergreen/magic_8ball.py b/bot/exts/evergreen/magic_8ball.py
index 7c9b929d..4b3ed2a4 100644
--- a/bot/exts/evergreen/magic_8ball.py
+++ b/bot/exts/evergreen/magic_8ball.py
@@ -14,8 +14,7 @@ class Magic8ball(commands.Cog):
"""A Magic 8ball command to respond to a user's question."""
def __init__(self):
- with open(Path("bot/resources/evergreen/magic8ball.json"), "r", encoding="utf8") as file:
- self.answers = json.load(file)
+ self.answers = json.loads(Path("bot/resources/evergreen/magic8ball.json").read_text("utf8"))
@commands.command(name="8ball")
async def output_answer(self, ctx: commands.Context, *, question: str) -> None: