aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/ext/commands/bot.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 1aa4133d..77123db5 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -274,6 +274,12 @@ class Bot(GroupMixin, discord.Client):
except:
pass
+ for cog in self.cogs:
+ try:
+ self.remove_cog(cog)
+ except:
+ pass
+
yield from super().close()
@asyncio.coroutine