replace-bot/load.py

17 lines
346 B
Python
Raw Normal View History

2022-02-16 18:13:44 +03:00
from aiogram import Dispatcher, Bot
from aiogram.bot.api import TelegramAPIServer
from playhouse.db_url import connect
from configs import Configure
config = Configure()
db = connect(config.db("db_link"))
bot = Bot(
token=config.bot("token"),
server=TelegramAPIServer.from_base(config.telegram_bot_api_server)
)
dp = Dispatcher(bot)