Answer the question
In order to leave comments, you need to log in
How to save all messages sent to telegram bot?
Hello!
I have a telegram bot, I want to save all the messages that users sent to it.
Theoretically, there should be such a possibility, because when deleting messages in a dialogue with him, it is displayed that the messages will be deleted only for the user, but will be visible to the bot.
I need this to analyze what features people use the most: what to speed up and what can be left as is.
I understand that it was necessary to tie up logging from the very beginning, I did not think.
Saved only user id for general mailings.
Answer the question
In order to leave comments, you need to log in
You can use the list and use the list.append(user_msg) method (where list is an arbitrary name of the list, where user_msg is the user's message (can be taken using the input() method), add it with messages.
I'm afraid the API doesn't provide that option. If you find something here , then you can implement it. But I don't remember that there was such a possibility.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question