2022-05-02 16:14:12 +00:00
|
|
|
import logging
|
|
|
|
import os
|
2022-05-02 20:44:16 +00:00
|
|
|
from dotenv import load_dotenv
|
|
|
|
|
2022-05-30 00:02:02 +00:00
|
|
|
from database import Database
|
2022-05-29 21:33:36 +00:00
|
|
|
from telegram import CommandProcessor
|
2022-05-02 16:14:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
load_dotenv()
|
|
|
|
|
|
|
|
token = os.getenv('TELEGRAM_TOKEN')
|
2022-05-30 00:02:02 +00:00
|
|
|
db_path = os.getenv('DATABASE_PATH')
|
|
|
|
|
|
|
|
db = Database(db_path)
|
|
|
|
bot = CommandProcessor(token, db)
|
2022-05-02 16:14:12 +00:00
|
|
|
|
|
|
|
logging.info("Starting Telegram bot")
|
|
|
|
bot.run()
|