@bot.command()
async def contrast(ctx: context, contrast:int):
await ctx.message.delete()
for attach in ctx.message.attachments:
# print(attach.url)
r = requests.get(attach.url)
image_data = r.content
image_bytesio = io.BytesIO(image_data)
attach_image = Image.open(image_bytesio)
enh = ImageEnhance.Contrast(attach_image)
enh.enhance(contrast).save('1.png')
await ctx.send(file=discord.File('1.png'))
@contrast.error
async def contrast_error(ctx:context, error:Exception):
await ctx.send('Возможно вы ввели не число, либо отправили не картинку.')
Можете уточнить?