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.
Feel free to contribute and improve the project. You can read the guidelines to contribute here
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
eapi_hash
. You can generate them here - 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.
The features of the commands are explained inside help.json
. It is the file which is used by the userbot to reply at /help <command name>
.
- register a new chat:
/setchat
<id_user> - delete a chat:
/delchat
<id_user> - 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
<id_chat> - How to update a record value of a chat:
/updatechat
<id_chat> <new_value> <old_value> - check if the bot is online:
/ping
This is an example of piechart plotted. It shows the weight of every chat saved.
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.
- Pyrogram
- peewee
- tempfile
- matplotlib
- numpy