Feat: some fixes
This commit is contained in:
8
main.py
8
main.py
@@ -1,3 +1,4 @@
|
||||
import asyncio
|
||||
import logging
|
||||
from sys import exit
|
||||
|
||||
@@ -18,7 +19,12 @@ if __name__ == "__main__":
|
||||
|
||||
User.create_table()
|
||||
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
loop = uvloop.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
# Start bot
|
||||
bot = NwXrayBot(config.bot_token.get_secret_value())
|
||||
bot.include_routers(HelloHandler(), MenuHandler(), AdminHandler())
|
||||
uvloop.run(bot.start(skip_updates=True))
|
||||
|
||||
asyncio.run(bot.start(skip_updates=True))
|
||||
|
||||
Reference in New Issue
Block a user