diff options
| author | 2021-05-13 13:34:06 -0400 | |
|---|---|---|
| committer | 2021-05-13 13:34:06 -0400 | |
| commit | 2aa1916d5c8e4832f26f6da4094238e9a0021d1c (patch) | |
| tree | 2ce3195a019ef84fd0b2d6509f5deec7b25e19bc /bot/exts/christmas | |
| parent | fix: Resolve Merge Conflicts (diff) | |
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/christmas')
| -rw-r--r-- | bot/exts/christmas/advent_of_code/_cog.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/christmas/advent_of_code/_cog.py index 863d2a21..ce6a4cb6 100644 --- a/bot/exts/christmas/advent_of_code/_cog.py +++ b/bot/exts/christmas/advent_of_code/_cog.py @@ -279,8 +279,7 @@ class AdventOfCode(commands.Cog): def _build_about_embed(self) -> discord.Embed: """Build and return the informational "About AoC" embed from the resources file.""" - with self.about_aoc_filepath.open("r", encoding="utf8") as f: - embed_fields = json.load(f) + embed_fields = json.loads(self.about_aoc_filepath.read_text("utf8")) about_embed = discord.Embed( title=self._base_url, |