mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -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:
@@ -144,7 +144,7 @@ class Mod(
|
||||
"Ignored guilds and channels have been moved. "
|
||||
"Please use {command} to migrate the old settings."
|
||||
).format(command=inline("[p]moveignoredchannels"))
|
||||
self.bot.loop.create_task(send_to_owners_with_prefix_replaced(self.bot, msg))
|
||||
asyncio.create_task(send_to_owners_with_prefix_replaced(self.bot, msg))
|
||||
message_sent = True
|
||||
break
|
||||
if message_sent is False:
|
||||
@@ -154,9 +154,7 @@ class Mod(
|
||||
"Ignored guilds and channels have been moved. "
|
||||
"Please use {command} to migrate the old settings."
|
||||
).format(command=inline("[p]moveignoredchannels"))
|
||||
self.bot.loop.create_task(
|
||||
send_to_owners_with_prefix_replaced(self.bot, msg)
|
||||
)
|
||||
asyncio.create_task(send_to_owners_with_prefix_replaced(self.bot, msg))
|
||||
break
|
||||
await self.config.version.set("1.1.0")
|
||||
if await self.config.version() < "1.2.0":
|
||||
@@ -166,7 +164,7 @@ class Mod(
|
||||
"Delete delay settings have been moved. "
|
||||
"Please use {command} to migrate the old settings."
|
||||
).format(command=inline("[p]movedeletedelay"))
|
||||
self.bot.loop.create_task(send_to_owners_with_prefix_replaced(self.bot, msg))
|
||||
asyncio.create_task(send_to_owners_with_prefix_replaced(self.bot, msg))
|
||||
break
|
||||
await self.config.version.set("1.2.0")
|
||||
if await self.config.version() < "1.3.0":
|
||||
|
||||
Reference in New Issue
Block a user