Since discord.py 2.0 and the addition of "asyncio.run(main())": When loading extensions, my extension file imports functions from the main file which gives the error "asyncio.run() cannot be called from a running event loop" Any ideas on how to fix this, why its happening, or ways to work around it?
Asked
Active
Viewed 126 times
1 Answers
0
You probably want
if __name__ == "__main__":
asyncio.run(main())
See What does if __name__ == "__main__": do? for some more info.

Oliver Tonnesen
- 693
- 4
- 8