From 6478d41b1795c5af963e2063416590b65c1d021d Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Thu, 30 Sep 2021 08:54:40 -0700 Subject: [PATCH] Try except on deleting the original heic file --- app/bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/bot.py b/app/bot.py index 5fc46582..92fed828 100755 --- a/app/bot.py +++ b/app/bot.py @@ -70,7 +70,10 @@ async def convert_heic_to_jpg(ctx): img.format='jpg' img.save(filename=jpg_file) img.close() - await ctx.delete() + try: + await ctx.delete() + except Exception: + pass await ctx.channel.send("%s said:\n%s" % (ctx.author.mention, ctx.content), file=discord.File(jpg_file)) return