19 lines
437 B
Python
19 lines
437 B
Python
from aiogram import Dispatcher, Bot
|
|
from aiogram.bot.api import TelegramAPIServer
|
|
from aiogram.contrib.fsm_storage.memory import MemoryStorage
|
|
from playhouse.db_url import connect
|
|
|
|
from configs import Configure
|
|
|
|
|
|
config = Configure()
|
|
|
|
db = connect(config.db_link)
|
|
|
|
bot = Bot(
|
|
token=config.token,
|
|
server=TelegramAPIServer.from_base(config.telegram_bot_api_server)
|
|
)
|
|
storage = MemoryStorage()
|
|
dp = Dispatcher(bot, storage=storage)
|