Files
nwxraybot/nwxraybot/bot.py

15 lines
435 B
Python

from aiogram import Bot, Dispatcher, Router
class NwXrayBot:
def __init__(self, token: str) -> None:
self.bot = Bot(token=token)
self.dp = Dispatcher()
def include_routers(self, *routers: Router):
for router in routers:
self.dp.include_router(router)
async def start(self, skip_updates: bool = False) -> None:
await self.dp.start_polling(self.bot, skip_updates=skip_updates)