Python script using Telegram-client API for testing if the selected Telegram bot is alive
git clone https://github.com/mtrineyev/pingbot.gitcd pingbotcp config.ini.example config.ininano config.iniand set the variables as described in the commentssudo apt-get install python3-devsudo apt-get install python3-venvpython3 -m venv venvsource venv/bin/activatepip install -r requirements.txtpython connect.pyand enter your phone and the code you will recievenano pingbot.shand copy the code below
#!/bin/bash
cd ~/pingbot
source venv/bin/activate
python main.py
deactivate
chmod +x pingbot.sh
~/pingbot/pingbot.sh- you may setup
crontab -eto run pingbot by schedule
connect.py- creates new connection to Telegram client or shows information about active connection, if any
The script is free software written by Maksym Trineyev (mtrineyev@gmail.com).
It comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.