forked from kodorvan/stcs
1
0
Fork 0
stcs/BibytBot_API.py

32 lines
789 B
Python

import asyncio
from aiogram import Bot, Dispatcher
from aiogram.filters import Command, CommandStart
from aiogram.types import Message
from app.telegram.database.models import async_main
from app.telegram.handlers.handlers import router # Для вызова событий
from app.telegram.functions.main_settings.settings import router_main_settings # Для вызова событий
from config import TOKEN_TG_BOT
from app.telegram.logs import logger
bot = Bot(token=TOKEN_TG_BOT)
dp = Dispatcher()
async def main():
await async_main()
dp.include_router(router)
dp.include_router(router_main_settings)
await dp.start_polling(bot)
if __name__ == '__main__':
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Bot is off")