diff options
| author | 2021-06-01 11:02:34 -0500 | |
|---|---|---|
| committer | 2021-06-01 11:02:34 -0500 | |
| commit | a25b9a2fea3ba48dd1ad036018169f6261894d39 (patch) | |
| tree | 69c9f89be843fefdb6fb70a926ef88b4f764a4ec /bot | |
| parent | Blocked mentions. (diff) | |
changes asked for by chris
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/evergreen/avatar_modification/_effects.py | 3 | ||||
| -rw-r--r-- | bot/exts/evergreen/avatar_modification/avatar_modify.py | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/evergreen/avatar_modification/_effects.py b/bot/exts/evergreen/avatar_modification/_effects.py index 7811d148..c5e5cb86 100644 --- a/bot/exts/evergreen/avatar_modification/_effects.py +++ b/bot/exts/evergreen/avatar_modification/_effects.py @@ -97,13 +97,12 @@ class PfpEffects: return image.quantize() @staticmethod - def reverse_effect(image: Image.Image) -> Image.Image: + def flip_effect(image: Image.Image) -> Image.Image: """ Flips the image horizontally. This is done by just using ImageOps.flip(). """ - image = image.resize((1024, 1024)) image = ImageOps.mirror(image) return image diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/evergreen/avatar_modification/avatar_modify.py index 6789f44a..4ed7f79d 100644 --- a/bot/exts/evergreen/avatar_modification/avatar_modify.py +++ b/bot/exts/evergreen/avatar_modification/avatar_modify.py @@ -124,7 +124,7 @@ class AvatarModify(commands.Cog): @avatar_modify.command(name="reverse", root_aliases=("reverse",)) async def reverse(self, ctx: commands.Context, *, text: t.Optional[str]) -> None: """Either flips your profile picture or the submitted text.""" - if not text: + if text is None: async with ctx.typing(): user = await self._fetch_user(ctx.author.id) image_bytes = await user.avatar_url_as(size=1024).read() @@ -133,7 +133,7 @@ class AvatarModify(commands.Cog): file = await in_executor( PfpEffects.apply_effect, image_bytes, - PfpEffects.reverse_effect, + PfpEffects.flip_effect, file_name ) |