diff options
author | 2022-10-05 18:47:35 +0100 | |
---|---|---|
committer | 2022-10-05 18:47:35 +0100 | |
commit | 5752acceca232e3d1232d91f9d0feb49aa7cc6c2 (patch) | |
tree | d775f25b2da42ba38270fc5dc16906ca8a83bbea | |
parent | Merge pull request #2267 from python-discord/move-filter-alerts (diff) | |
parent | Merge branch 'main' into 2281-fix-non-awaited-remove-cog-calls (diff) |
Merge pull request #2284 from shtlrs/2281-fix-non-awaited-remove-cog-calls
Fix all non-awaited bot.remove_cog calls
-rw-r--r-- | bot/exts/filters/antispam.py | 2 | ||||
-rw-r--r-- | bot/exts/help_channels/_cog.py | 2 | ||||
-rw-r--r-- | bot/exts/moderation/watchchannels/_watchchannel.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/filters/antispam.py b/bot/exts/filters/antispam.py index 842aab384..b4e7a33f0 100644 --- a/bot/exts/filters/antispam.py +++ b/bot/exts/filters/antispam.py @@ -156,7 +156,7 @@ class AntiSpam(Cog): colour=Colour.red() ) - self.bot.remove_cog(self.__class__.__name__) + await self.bot.remove_cog(self.__class__.__name__) return @Cog.listener() diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index f1351013a..31a33f8af 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -315,7 +315,7 @@ class HelpChannels(commands.Cog): ) except discord.HTTPException: log.exception("Failed to get a category; cog will be removed") - self.bot.remove_cog(self.qualified_name) + await self.bot.remove_cog(self.qualified_name) async def cog_load(self) -> None: """Initialise the help channel system.""" diff --git a/bot/exts/moderation/watchchannels/_watchchannel.py b/bot/exts/moderation/watchchannels/_watchchannel.py index 46f9c296e..6eaedf6b3 100644 --- a/bot/exts/moderation/watchchannels/_watchchannel.py +++ b/bot/exts/moderation/watchchannels/_watchchannel.py @@ -128,7 +128,7 @@ class WatchChannel(metaclass=CogABCMeta): colour=Color.red() ) - self.bot.remove_cog(self.__class__.__name__) + await self.bot.remove_cog(self.__class__.__name__) return if not await self.fetch_user_cache(): |