diff options
| author | 2021-04-08 10:04:14 +0100 | |
|---|---|---|
| committer | 2021-04-08 10:04:14 +0100 | |
| commit | 422f6d50b8eeafdf2118f1d0e96c420c0b1391ce (patch) | |
| tree | 7b5933faee2968ad80066f0806ca3f383b2b8e72 /bot/exts | |
| parent | Fetch member before modifying their pfp (diff) | |
Refactor pfp cog to remove unnecessary params and calls
Co-authored-by: ToxicKidz <[email protected]>
Diffstat (limited to 'bot/exts')
| -rw-r--r-- | bot/exts/evergreen/profile_pic_modification/_effects.py | 2 | ||||
| -rw-r--r-- | bot/exts/evergreen/profile_pic_modification/pfp_modify.py | 4 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/bot/exts/evergreen/profile_pic_modification/_effects.py b/bot/exts/evergreen/profile_pic_modification/_effects.py index a1069db7..e415d700 100644 --- a/bot/exts/evergreen/profile_pic_modification/_effects.py +++ b/bot/exts/evergreen/profile_pic_modification/_effects.py @@ -12,7 +12,7 @@ class PfpEffects:      """      Implements various image modifying effects, for the PfpModify cog. -    All of these fuctions are slow, and blocking, so should be ran in executors. +    All of these fuctions are slow, and blocking, so they should be ran in executors.      """      @staticmethod diff --git a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py index c4b74d04..712631d1 100644 --- a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py +++ b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py @@ -21,7 +21,7 @@ _EXECUTOR = ThreadPoolExecutor(10)  FILENAME_STRING = "{effect}_{author}.png"  with open('bot/resources/pride/gender_options.json') as f: -    GENDER_OPTIONS = json.loads(f.read()) +    GENDER_OPTIONS = json.load(f)  async def in_executor(func: t.Callable, *args) -> t.Any: @@ -98,7 +98,7 @@ class PfpModify(commands.Cog):          await ctx.send(embed=embed, file=file) -    @pfp_modify.command(pass_context=True, aliases=["easterify"], root_aliases=("easterify", "avatareasterify")) +    @pfp_modify.command(aliases=["easterify"], root_aliases=("easterify", "avatareasterify"))      async def avatareasterify(self, ctx: commands.Context, *colours: t.Union[discord.Colour, str]) -> None:          """          This "Easterifies" the user's avatar. | 
