A
A
Alexander Dedunovich2020-11-27 15:06:48
Bots
Alexander Dedunovich, 2020-11-27 15:06:48

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

2 answer(s)
F
FlashBoy, 2020-11-27
@FlashBoy

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.

M
Mikhail Krostelev, 2020-11-27
@twistfire92

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 question

Ask a Question

731 491 924 answers to any question