mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2025-05-01 05:43:44 +03:00
25 lines
553 B
Python
25 lines
553 B
Python
from src.modules.standard.config.config import get_config
|
|
from src.modules.standard.database.models.base import database
|
|
from src.modules.standard.database.api import connect_database
|
|
|
|
from asyncio import run
|
|
from aiogram import Bot, Dispatcher
|
|
|
|
|
|
async def main():
|
|
try:
|
|
database = connect_database()
|
|
bot = Bot(token=get_config()["TELEGRAM"]["TOKEN"])
|
|
|
|
dp = Dispatcher()
|
|
|
|
await dp.start_polling(bot)
|
|
|
|
finally:
|
|
await bot.session.close()
|
|
database.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run(main())
|