Deleting the image sent before grayscale is applied

pull/8/head
sgoudham 4 years ago
parent 58a5756f4d
commit 18cacdf79c

@ -438,6 +438,8 @@ class Fun(Cog):
"""Display grayscale version of image uploaded""" """Display grayscale version of image uploaded"""
if ctx.message.attachments: if ctx.message.attachments:
await ctx.message.delete()
for attachments in ctx.message.attachments: for attachments in ctx.message.attachments:
attach = await attachments.read() attach = await attachments.read()
image = Image.open(io.BytesIO(attach)).convert('LA') image = Image.open(io.BytesIO(attach)).convert('LA')

Loading…
Cancel
Save