[commands] Unload all cogs when gracefully exiting bot.

This commit is contained in:
Rapptz 2016-12-17 14:47:29 -05:00
parent b8909ae389
commit fc1a7183a0

View File

@ -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