Answer the question
In order to leave comments, you need to log in
How to handle all message types in aiogram?
How to make such a handler for all message types?
@dp.message_handler(state=Mail.message)
async def process_send_image(message: types.Message, state: FSMContext):
Answer the question
In order to leave comments, you need to log in
aiogram has a special key for this content_types=['any']
https://docs.aiogram.dev/en/latest/telegram/types/...
@dp.message_handler(state=Mail.message, content_types=['any'])
async def process_send_image(message: types, state: FSMContext):
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question