- python - 3.6
- sqlAlchemy - 1.2.7
- requests-html - 0.9.0
- python-telegram-bot - 10.1.0
Telegram: @LoFi_bot
- Install PostgreSQL
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
- Create data base
CREATE DATABASE <data_base_name>;
- Create user for data base
CREATE USER <user_name> WITH PASSWORD 'CREATESTRONGPASSS';
ALTER ROLE <user_name> SET client_encoding TO 'utf8';
ALTER ROLE <user_name> SET timezone TO 'GMT';
GRANT ALL PRIVILEGES ON DATABASE <data_base_name> TO <user_name>;
- Install python requirements
pip install -r requirements.txt
- Create tables in database
python create_db_schema.py
- Rename conf_example.py -> conf.py and configure bot.
TOKEN=<bot_token>
...and other setting in conf.py
- Run Bot
python bot.py