Answer the question
In order to leave comments, you need to log in
How to get rid of an error when sending a photo to a telegram bot?
Hello, I have a problem with sending photos by telegram bot. I use the telebot library. I immediately want to apologize if the question is stupid, or if the question is incorrectly formatted (I ask a question on the Internet for the first time).
Here is the code:
bot.massage_handler(content_types = ['text'])
def massage_photo(massage):
if massage.text == "photo 1" or "photo1":
photo = open('E:/Bot/photo/photo1. jpg', 'rb')
tb.send_photo(443519574, photo)
tb.send_photo(443519574, "FILEID")
Error: invalid syntax.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question