mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -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:
@@ -35,7 +35,7 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
self, message: discord.Message, emoji: MutableMapping = None
|
||||
) -> asyncio.Task:
|
||||
"""Non blocking version of clear_react."""
|
||||
task = self.bot.loop.create_task(self.clear_react(message, emoji))
|
||||
task = asyncio.create_task(self.clear_react(message, emoji))
|
||||
task.add_done_callback(task_callback_trace)
|
||||
return task
|
||||
|
||||
|
||||
Reference in New Issue
Block a user