Bot puts reaction to new posts in the channel, group or chat. Reactions are set from all connected sessions, as well as automatic subscription to channels from these sessions!
Good stuff π:
- Automatically converts
TDATA to a Pyrogram session
. - Automatically converts a
Telethon session to a Pyrogram session
.
-
Create an empty directory
-
git clone https://github.com/kanewi11/telegram-reaction-bot.git ./
. -
python3 -m venv venv
or on windowspython -m venv venv
. -
. venv/bin/activate
or on windows\venv\Scripts\activate
. -
pip install -r requirements.txt
or in windowspip install -r requirements_win.txt
. -
Add your channel name to
config.py
. -
If you plan to use the TDATA converter, go to
converters/tdata_to_telethon.py
and insert yourAPI_HASH
andAPI_ID
(lines 19 and 20). -
mkdir sessions
andmkdir tdatas
(or just create these two folders) -
Add the session file and its configuration file to the
/sessions
directory ( which we created in step 8 ) or tdata files to the/tdatas
folder (Note the 7th point). Here is an example:your_dir ββββreactionbot.py β ββββsessions β β 8888888888.ini β β 8888888888.session β β 9999999999.ini β β 9999999999.session β β 98767242365.json β β 98767242365.session β β ... β ββββtdatas β ββββ my_tdata β β β key_datas β β β ... ...
-
nohup python reactionbot.py &
Create a file my_account.json
( the file name can be anything ) in the directory /sessions
:
{
"api_id": "your_api_id",
"api_hash": "your_api_hash",
"phone_number": "your_phone_number"
}
After python reactionbot.py
, in the console go through the account authorization steps and that's it, the session file will be created, you don't need to do this for the next times.
You can add more parameters that pyrogram supports.
sessions/888888888.ini
[pyrogram]
api_id = your_api_id
api_hash = your_api_hash
phone_number = 888888888
# optional parameters
app_version = '8.8.5'
device_model = 'Vertu IVERTU'
system_version = 'Android'
OR ( select one of the variants of the configuration file )
sessions/888888888.json
{
"api_id": "your_api_id",
"api_hash": "your_api_hash",
"phone_number": "your_phone_number",
...
}