mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
[commands] Unload all cogs when gracefully exiting bot.
This commit is contained in:
parent
b8909ae389
commit
fc1a7183a0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user