mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -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:
@@ -819,7 +819,7 @@ class Permissions(commands.Cog):
|
||||
cog_or_command.deny_to(model_id, guild_id=guild_id)
|
||||
|
||||
def cog_unload(self) -> None:
|
||||
self.bot.loop.create_task(self._unload_all_rules())
|
||||
asyncio.create_task(self._unload_all_rules())
|
||||
|
||||
async def _unload_all_rules(self) -> None:
|
||||
"""Unload all rules set by this cog.
|
||||
|
||||
Reference in New Issue
Block a user