tg_rss_bot/bot.py
Alexey Skobkin 93610e4084
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
#7 Database integration. All basic commands implemented in CommandProcessor. Two telegram update middlewares implemented (UserAuthMiddleware, ExceptionHandlerMiddleware).
2022-05-30 03:02:02 +03:00

19 lines
322 B
Python

import logging
import os
from dotenv import load_dotenv
from database import Database
from telegram import CommandProcessor
load_dotenv()
token = os.getenv('TELEGRAM_TOKEN')
db_path = os.getenv('DATABASE_PATH')
db = Database(db_path)
bot = CommandProcessor(token, db)
logging.info("Starting Telegram bot")
bot.run()