From 6ea7fce828987a0678a39dcf4b30634c472fee25 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 3 Dec 2020 19:17:06 -0500 Subject: [PATCH] [commands] Cog unload failures are swallowed. Fix #6113 --- discord/ext/commands/cog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 9ec49ab14..774f5317c 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -437,4 +437,7 @@ class Cog(metaclass=CogMeta): if cls.bot_check_once is not Cog.bot_check_once: bot.remove_check(self.bot_check_once, call_once=True) finally: - self.cog_unload() + try: + self.cog_unload() + except Exception: + pass