forked from kodorvan/stcs
add files project
This commit is contained in:
31
BibytBot_API.py
Normal file
31
BibytBot_API.py
Normal file
@@ -0,0 +1,31 @@
|
||||
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")
|
Reference in New Issue
Block a user