diff options
Diffstat (limited to 'bot')
-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) |