Answer the question
In order to leave comments, you need to log in
How to get last message from user in pytelegrammbotapi?
I will give an example of a bot:
The user writes start The
bot responds with a message with an inline button.
The user presses the button The
bot writes You are registered and enters the user ID into the database.
But if you look at the database, you can see that the user ID is not a user, but a bot. Since after a click is detected, the user ID of the sender is taken from the message with the button, and this is a bot.
Of course, you can take the user ID from the start command, but in other scenarios this will not work.
I have a chat id and I need to get the last message from the user. Not a bot. How to do it on pytelegrambotapi?
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