COVID-19 Turkey Telegram Bot
Sends daily and total COVID-19 statistics in Turkey.
- Gets data from ykursadkaya/covid19-turkey-api
- Checks the API every n (default is 60 in script) seconds, if anything changes in the stats sends message in Turkish via Telegram Bot API with provided API token and chat ID.
Telegram Message Screenshot
Setup
Create your Telegram Bot
-
Create your bot and get your API token
-
Add your bot to a group or start a private chat with your bot
-
Get chat_id from Telegram Bot API
Run on a Docker container
-
Clone this repository
git clone https://github.com/ykursadkaya/covid19-turkey-bot.git cd covid19-turkey-bot
-
Build Docker image
docker build -t covidbot .
-
Run container
docker run -p <external-port>:5000 --name <container-name> -e TELEGRAM_API_TOKEN=<api-token> -e TELEGRAM_CHAT_ID=<chat-id> -e COVIDAPI_URL=<api-url> covidbot
Run directly on your machine
-
Install Python 3
-
Install pip for Python 3
-
Clone this repository
git clone https://github.com/ykursadkaya/covid19-turkey-bot.git cd covid19-turkey-bot
-
Install required Python packages
pip3 install -r requirements.txt
-
Run script
python3 main.py