replace-bot/load.py
2022-02-16 17:13:44 +02:00

17 lines
346 B
Python

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)