aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/valentines/savethedate.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/valentines/savethedate.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/valentines/savethedate.py')
-rw-r--r--bot/exts/valentines/savethedate.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/valentines/savethedate.py b/bot/exts/valentines/savethedate.py
index cc16f5c9..ffe559d6 100644
--- a/bot/exts/valentines/savethedate.py
+++ b/bot/exts/valentines/savethedate.py
@@ -1,6 +1,6 @@
import logging
import random
-from json import load
+from json import loads
from pathlib import Path
import discord
@@ -13,8 +13,7 @@ log = logging.getLogger(__name__)
HEART_EMOJIS = [":heart:", ":gift_heart:", ":revolving_hearts:", ":sparkling_heart:", ":two_hearts:"]
-with open(Path("bot/resources/valentines/date_ideas.json"), "r", encoding="utf8") as f:
- VALENTINES_DATES = load(f)
+VALENTINES_DATES = loads(Path("bot/resources/valentines/date_ideas.json").read_text("utf8"))
class SaveTheDate(commands.Cog):