aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/avatar_modification
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/avatar_modification
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/evergreen/avatar_modification')
-rw-r--r--bot/exts/evergreen/avatar_modification/avatar_modify.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/evergreen/avatar_modification/avatar_modify.py
index 5685b2c1..199b6dcb 100644
--- a/bot/exts/evergreen/avatar_modification/avatar_modify.py
+++ b/bot/exts/evergreen/avatar_modification/avatar_modify.py
@@ -6,6 +6,7 @@ import string
import typing as t
import unicodedata
from concurrent.futures import ThreadPoolExecutor
+from pathlib import Path
import discord
from aiohttp import client_exceptions
@@ -27,8 +28,7 @@ MAX_SQUARES = 10_000
T = t.TypeVar("T")
-with open("bot/resources/pride/gender_options.json") as f:
- GENDER_OPTIONS = json.load(f)
+GENDER_OPTIONS = json.loads(Path("bot/resources/pride/gender_options.json").read_text("utf8"))
async def in_executor(func: t.Callable[..., T], *args) -> T: