Original bot - @tagirweatherbot
The weather bot for telegram.
(Only Russian language is supported)
To run this bot you need:
- Register bot in @BotFather and get token.
- Register in openweathermap.org and get api key.
- Get login, password, database and host for PostgreSQL.
- Clone this repository:
git clone https://github.com/tagirhamitov/weatherbot.git
cd weatherbot
- Create file
config.json
. Example:
{
"token": "YOUR_TELEGRAM_TOKEN_HERE",
"appid": "YOUR_OPENWEATHERMAP_API_KEY_HERE",
"login": "YOUR_POSTGRESQL_LOGIN_HERE",
"password": "YOUR_POSTGRESQL_PASSWORD_HERE",
"db_name": "YOUR_POSTGRESQL_DATABASE_NAME_HERE",
"host": "YOUR_POSTGRESQL_HOST_HERE",
"admin_id": "YOUR_TELEGRAM_ID_HERE"
}
- Run
main.py
- If you want to deploy the bot to heroku, set environment variables: token, appid, login, password, db_name, host and admin_id with their values in heroku settings and define an empty environment variable HEROKU.