diff options
author | 2021-03-06 12:15:28 +0000 | |
---|---|---|
committer | 2021-03-06 12:15:28 +0000 | |
commit | ea44e8ed8f5804cf5d80ab2318db6359c1e22c17 (patch) | |
tree | 52ca0b9097af5b148fa4ce6e3fb2ef7b637edddf | |
parent | Fix return type of in_executor. Its return type varies, based on the Callable... (diff) |
Don't return discord.Messages.
-rw-r--r-- | bot/exts/evergreen/profile_pic_modification/pfp_modify.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py index bba688aa..7d4326a4 100644 --- a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py +++ b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py @@ -185,11 +185,16 @@ class PfpModify(commands.Cog): try: response = await session.get(url) except client_exceptions.ClientConnectorError: - return await ctx.send("Cannot connect to provided URL!") + await ctx.send("Cannot connect to provided URL!") + return except client_exceptions.InvalidURL: - return await ctx.send("Invalid URL!") + await ctx.send("Invalid URL!") + return + if response.status != 200: - return await ctx.send("Bad response from provided URL!") + await ctx.send("Bad response from provided URL!") + return + image_bytes = await response.read() await self.send_pride_image(ctx, image_bytes, pixels, flag, option) |