We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adc4d2c commit 10f016cCopy full SHA for 10f016c
bot.py
@@ -11,7 +11,6 @@
11
12
import pytz
13
import sentry_sdk
14
-import tornado
15
16
from client_wrapper import ClientWrapper
17
from constants import (
@@ -1646,10 +1645,11 @@ async def async_main():
1646
1645
await bot.startup()
1647
1648
1649
-def main():
+async def main():
1650
"""main function for bot command"""
1651
- tornado.ioloop.IOLoop.current().run_sync(async_main)
+ await async_main()
+ await asyncio.Event().wait()
1652
1653
1654
if __name__ == "__main__":
1655
- main()
+ asyncio.run(main())
0 commit comments