T
T
Tomorrow7722021-08-19 13:21:16
Python
Tomorrow772, 2021-08-19 13:21:16

Getting photo in aiogram bytes?

hello, I want to get a photo into a variable without downloading the photo that the user attaches to the /photo command,

here is the code:

@dp.message_handler(commands=['photo'], commands_prefix="/.!?~-+")
async def version(message: types.Message):
   # тут типа код как бот получает фото, но я не знаю как написать данный код...
    im = Image.open(photo)
    im = im.rotate(180) 
    await message.answer(f'получил фото', parse_mode='Markdown')


help me please

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question