aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/pride/pride_anthem.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_anthem.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/pride/pride_anthem.py')
-rw-r--r--bot/exts/pride/pride_anthem.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/exts/pride/pride_anthem.py b/bot/exts/pride/pride_anthem.py
index a7f8d7ef..21b7e468 100644
--- a/bot/exts/pride/pride_anthem.py
+++ b/bot/exts/pride/pride_anthem.py
@@ -36,9 +36,7 @@ class PrideAnthem(commands.Cog):
@staticmethod
def load_vids() -> list:
"""Loads a list of videos from the resources folder as dictionaries."""
- with open(Path("bot/resources/pride/anthems.json"), "r", encoding="utf8") as f:
- anthems = json.load(f)
- return anthems
+ return json.loads(Path("bot/resources/pride/anthems.json").read_text("utf8"))
@commands.command(name="prideanthem", aliases=["anthem", "pridesong"])
async def prideanthem(self, ctx: commands.Context, genre: str = None) -> None: