aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/pride/pride_facts.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/pride/pride_facts.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/pride/pride_facts.py')
-rw-r--r--bot/exts/pride/pride_facts.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/pride/pride_facts.py b/bot/exts/pride/pride_facts.py
index 6d06cf64..47e69a03 100644
--- a/bot/exts/pride/pride_facts.py
+++ b/bot/exts/pride/pride_facts.py
@@ -28,8 +28,7 @@ class PrideFacts(commands.Cog):
@staticmethod
def load_facts() -> dict:
"""Loads a dictionary of years mapping to lists of facts."""
- with open(Path("bot/resources/pride/facts.json"), "r", encoding="utf8") as f:
- return json.load(f)
+ return json.loads(Path("bot/resources/pride/facts.json").read_text("utf8"))
@seasonal_task(Month.JUNE)
async def send_pride_fact_daily(self) -> None: