D
D
Didi_Tariani2022-04-05 14:20:51
Python
Didi_Tariani, 2022-04-05 14:20:51

How to catch files in aiogram?

Hello everyone, I am writing a telegram bot, I need it to catch the files that the user sends to it.

@dp.message_handler()
async def catch_file(message):
    print(message)

I made such a handler to understand how to work with such a message
when I send a file to a bot (pdf) 0 reactions
when I send a normal text message displays everything as it should
how to make it so that he saw the files too ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2022-04-05
@HemulGM

Telegram doesn't send you files, it sends links. Open the api documentation and you will see the fields in which there will be links to attachments

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question