mkdryden / telegram-stats-bot

A simple bot that lives in your Telegram group, logging messages to a Postgresql database and serving statistical tables and plots to users as Telegram messages.
GNU General Public License v3.0
53 stars 20 forks source link

Can it get messages from past? #29

Closed dinosaurtirex closed 1 year ago

dinosaurtirex commented 1 year ago

Can it analyse messages before bot was added?

mkdryden commented 1 year ago

See here. It's a bit experimental, so please let me know if you have any issues, but I have used it successfully for a couple of chats. (A few things can't be imported because they don't get saved in the history dump, like when people change user names, but all the actual message content should work)

dinosaurtirex commented 1 year ago

See here. It's a bit experimental, so please let me know if you have any issues, but I have used it successfully for a couple of chats. (A few things can't be imported because they don't get saved in the history dump, like when people change user names, but all the actual message content should work)

Yep i saw that, it is working. Not without couple of issues, but it is easy to fix depend on task and dataset. In my case there was no polls and i just remove check for the polls in the data generator :)

dinosaurtirex commented 1 year ago

See here. It's a bit experimental, so please let me know if you have any issues, but I have used it successfully for a couple of chats. (A few things can't be imported because they don't get saved in the history dump, like when people change user names, but all the actual message content should work)

By the way, it was my first experience integrating a Telegram bot into a large chat community, and it was very unexpected that Telegram doesn't support chat history for bots. Not many people knew about this, so when I ran the bot for the first time, it didn't work. I suppose the issue isn't with the bot itself, but rather with Telegram's privacy policy. However, initially, my first guess was that the problem lay within the bot. In my opinion, it would be very useful to include information about this in the README file.