https://github.com/mastercruelty/telegramchatinsights
A simple userbot to show some data about your chats on Telegram.
https://github.com/mastercruelty/telegramchatinsights
chart graph pyrogram python3 statistics telegram-api telegramstat userbot-telegram
Last synced: 2 months ago
JSON representation
A simple userbot to show some data about your chats on Telegram.
- Host: GitHub
- URL: https://github.com/mastercruelty/telegramchatinsights
- Owner: MasterCruelty
- License: mit
- Created: 2024-03-30T16:54:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-13T14:54:47.000Z (about 1 year ago)
- Last Synced: 2024-04-14T09:38:43.544Z (about 1 year ago)
- Topics: chart, graph, pyrogram, python3, statistics, telegram-api, telegramstat, userbot-telegram
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/MasterCruelty/telegramchatinsights/stargazers)
[](https://github.com/MasterCruelty/telegramchatinsights/network/members)

[](https://github.com/MasterCruelty/telegramchatinsights/issues)


# Telegram Chat Insights
# What is it
This project is about a Telegram app made by creating a userbot based on Pyrogram.
The main feature is to show your data about personal chat by plotting charts. It's still in development and more features could be implemented.### Contribute
Feel free to contribute and improve the project. You can read the guidelines to contribute [here](https://github.com/MasterCruelty/TelegramChatInsights/blob/main/CONTRIBUTING.md)# How to setup
The correct way to setup this bot is to compile the file ```config.json```. So it's necessary to have these data:
* Telegram api keys: ```api_id``` e ```api_hash```. You can generate them [here](https://my.telegram.org/apps)
* Telegram data of the owner of the bot: ```id_super_admin```.
* The path where is the .db file: ```path_db```.
* The session name: ```session_name```.
* Name of super admin commands: ```super_admin_commands```.Name of commands to put inside ```config.json``` can be copied from source code or renamed inside source code and then copied in json file.
### How the userbot's commands works
The features of the commands are explained inside ```help.json```. It is the file which is used by the userbot to reply at ```/help ```.
### How the admin/super commands works
* register a new chat: ```/setchat```
* delete a chat: ```/delchat```
* How to list all user registered: ```/listchat```
* How to show ho many chats are registered: ```/allchat```
* How to get all saved data about a specific chat: ```/getchatdata```
* How to update a record value of a chat: ```/updatechat```
* check if the bot is online: ```/ping```### Example of execution
This is an example of piechart plotted. It shows the weight of every chat saved.
### How data is collected
There's a dedicated command to do that: ```/newcheck```
By launching it, it starts calculating all the amount of messages for every saved chat using Telegram API and save those data with the current date.
The next time you decide to launch this command, you can view the difference between the last check and the new one.
At the moment this command is launched manually by the user, thought initially as userbot not running 24/7.
In the near future it could be instead an automatic check made daily or weekly and then a 24/7 running app.### Dependencies
* Pyrogram
* peewee
* tempfile
* matplotlib
* numpy### External projects used
* [Pyrogram](https://github.com/pyrogram/pyrogram)
* [Peewee](https://github.com/coleifer/peewee)