|
|
@ -438,8 +438,6 @@ 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')
|
|
|
@ -449,6 +447,7 @@ class Fun(Cog):
|
|
|
|
image.save(file, format='PNG')
|
|
|
|
image.save(file, format='PNG')
|
|
|
|
file.seek(0)
|
|
|
|
file.seek(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await ctx.message.delete()
|
|
|
|
# Send Grayscale Image
|
|
|
|
# Send Grayscale Image
|
|
|
|
await ctx.send(file=discord.File(file, "gp.png"))
|
|
|
|
await ctx.send(file=discord.File(file, "gp.png"))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|