From 7acc89952ca289c7b5685fd1d737607158053e1e Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 25 Aug 2020 02:49:49 +0100 Subject: [PATCH] I was deleting the message too early for the grayscale to work --- cogs/fun.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 087794d0..a4c39892 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -438,8 +438,6 @@ class Fun(Cog): """Display grayscale version of image uploaded""" if ctx.message.attachments: - await ctx.message.delete() - for attachments in ctx.message.attachments: attach = await attachments.read() image = Image.open(io.BytesIO(attach)).convert('LA') @@ -449,6 +447,7 @@ class Fun(Cog): image.save(file, format='PNG') file.seek(0) + await ctx.message.delete() # Send Grayscale Image await ctx.send(file=discord.File(file, "gp.png")) else: