K
K
Kr1stian2021-07-02 10:59:15
Python
Kr1stian, 2021-07-02 10:59:15

How to send a pdf file from a bot?

I am writing a bot on python-telegram-bot. Tell me how to send a pdf file from the bot, otherwise I found the info only if the bot was written using telebot.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kr1stian, 2021-07-02
@Kr1stian

Decided like this:

document = open("Путь к документу", "rb")
       update.message.reply_document(
           document 
       )

S
soremix, 2021-07-02
@SoreMix

send_document(chat_id, document)
https://python-telegram-bot.readthedocs.io/en/late...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question