mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2026-01-20 15:12:59 -05:00
Switch from low-level loop.create_task and asyncio.ensure_future (#5626)
* Switch from low-level loop.create_task and asyncio.ensure_future * Patch vendored discord.ext.menus to use modern APIs as well That ext is no longer maintained by Danny anyway so... * black
This commit is contained in:
@@ -493,7 +493,7 @@ def red_exception_handler(red, red_task: asyncio.Future):
|
||||
except Exception as exc:
|
||||
log.critical("The main bot task didn't handle an exception and has crashed", exc_info=exc)
|
||||
log.warning("Attempting to die as gracefully as possible...")
|
||||
red.loop.create_task(shutdown_handler(red))
|
||||
asyncio.create_task(shutdown_handler(red))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user