I am forwarding messages to bot. Then bot simple prints it to my console (for the first time). Then, let’s look at the example:
The main problem is that the hierarchy of these messages is wrong. And it’s always different, it can be even correct, but rarely…
How to correctly get all messages with correct hierarchy?
Code that I use:
@bot.message_handler(func=lambda message: message.forward_from != None) # handles only forwarded messages def newPost(message): print(message.text)
Python 3, PyTelegramBotAPI