This script sends reactions to a new post or message in selected open groups and channels, as well as automatically subscribes to them.
-
Create an empty directory
-
git clone https://github.com/kanewi11/telegram-reaction-bot.git ./
-
python3 -m venv venv
-
source venv/bin/activate
-
pip install -r requirements.txt
-
Add your channel name to
config.py
-
mkdir sessions
-
Sessions must be for pyrogram!
Add the session file and its configuration file to the /sessions directory ( which we created in step 7 ).
These two files must have the same name! Here is an example:
you_dir └───sessions │ │ 8888888888.ini │ │ 8888888888.session │ │ 9999999999.ini │ │ 9999999999.session │ │ 98767242365.json │ │ 98767242365.session ...
-
nohup python reactionbot.py &
You can add more parameters that pyrogram supports.
[pyrogram]
api_id = you_api_id
api_hash = you_api_hash
# optional parameters
app_version = '8.8.5'
device_model = 'Vertu IVERTU'
system_version = 'Android'
You can add more parameters that pyrogram supports.
{
"api_id": "you_api_id",
"api_hash": "you_api_hash",
...
}
- If there will be time to add session definition and conversion from tdata, telethon. But I don't think the time will come 🙃.