Feat: started working on the sub notification
This commit is contained in:
6
main.py
6
main.py
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user