G
G
GREYSERGING2022-02-27 09:56:36
go
GREYSERGING, 2022-02-27 09:56:36

How to send a file to telegram bot?

How can I send a file to a telegram bot. In Python this is done:

with open(filename, "rb") as rb:
   archive = {"document": rb}
   requests.post(f"https://api.telegram.org/bot(token)/sendDocument?chat_id=(id)", files=archive)

And how to do it on GO?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question