It is necessary for me that depending on the previous message the photo was processed or not. How to implement this in pyTelegramBotAPI?
There is a function that processes a photo or document after it is sent to the chat
@bot.message_handler(content_types=['photo', 'document'])
def photo_processing(message):
...
I want to implement such a construction inside this function
if previous_message == "1":
...
else:
...
In other words, I need a bool flag that changes depending on the previous message