K
K
kodbiprog2021-04-19 18:28:08
Python
kodbiprog, 2021-04-19 18:28:08

How to track photo sent to python telegram bot?

How to do the following?:
If the user sends any image, the bot will respond to him.
I know similar with if message.text == "":
How to do with image?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexa2007, 2021-04-19
@kodbiprog

@bot.message_handler(content_types=['photo'])
def photo(message):
  bot.send_message(message.chat.id, 'You send me a photo!')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question