Feat: started working on the sub notification

This commit is contained in:
2025-01-13 15:50:45 +03:00
parent b5a893e5aa
commit 7d50cf95cf
4 changed files with 36 additions and 1 deletions

View File

@@ -8,6 +8,10 @@ from nwxraybot import NwXrayBot, Settings
from nwxraybot.handlers import *
from nwxraybot.models import User
async def main(bot: NwXrayBot, skip_updates: bool = True) -> None:
await asyncio.create_task(bot.start())
if __name__ == "__main__":
config = Settings() # Load config from .env
logging.basicConfig(level=logging.DEBUG if config.debug else logging.INFO)
@@ -27,4 +31,4 @@ if __name__ == "__main__":
bot = NwXrayBot(config.bot_token.get_secret_value())
bot.include_routers(HelloHandler(), MenuHandler(), AdminHandler())
asyncio.run(bot.start(skip_updates=True))
asyncio.run(main(bot))