0
0
mirror of https://gitflic.ru/project/maks1ms/ocab.git synced 2025-03-20 17:23:46 +03:00
ocab/src/core/main.py

20 lines
332 B
Python
Raw Normal View History

from .config import yaml_load
from asyncio import run
from aiogram import Bot, Dispatcher
async def main():
try:
bot = Bot(token=yaml_load["TELEGRAM"]["TOKEN"])
dp = Dispatcher()
await dp.start_polling(bot)
finally:
await bot.session.close()
if __name__ == "__main__":
run(main())