Answer the question
In order to leave comments, you need to log in
How can I send an image without saving it. Aiogram library?
How can I send a PILLOW-processed image of a user to a chat with him?
@dp.message_handler(content_types=['photo'], state=filter.photo)
async def load_photo(message: types.Message, state: FSMContext):
async with state.proxy() as data:
data['photo'] = message.photo[0].file_id
await filter.next()
await bot.send_message(message.from_user.id, 'Теперь, выберите тип фильтра, что будет наложен на изображение.', reply_markup=nav.filtersMenu)
@dp.message_handler(state=filter.set_filter)
async def set_filter(message: types.Message, state: FSMContext):
async with state.proxy() as data:
data['filter'] = message.text
async with state.proxy() as data:
if data['filter'] == 'Контур':
file_info = await bot.get_file(data['photo'])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question