send document file #2297
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The wiki has a quite detailed chapter about working with files and medias: Working with files and media In short, to send a file from disk, you have to open it and pass the bytes object to the with open("some_file.txt", "rb") as f:
bot.send_document(chat_id, f) |
Beta Was this translation helpful? Give feedback.
-
Hello how can i send i file like jpg mp4 via python-telegram-bot |
Beta Was this translation helpful? Give feedback.
-
unsubscribe
…On Sat, Nov 2, 2024 at 10:16 PM MORTEZA-ALIZADA ***@***.***> wrote:
Hello how can i send i file like jpg mp4 via python-telegram-bot
—
Reply to this email directly, view it on GitHub
<#2297 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBQRMIARULQB3IB43JUF7ULZ6UCHDAVCNFSM6AAAAABRB4UCKOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJTGA2TAMY>
.
You are receiving this because you are subscribed to this thread.Message
ID:
<python-telegram-bot/python-telegram-bot/repo-discussions/2297/comments/11130503
@github.com>
|
Beta Was this translation helpful? Give feedback.
The wiki has a quite detailed chapter about working with files and medias: Working with files and media
In short, to send a file from disk, you have to open it and pass the bytes object to the
Bot.send_document
method: