Browse Source

[commands] Unload all cogs when gracefully exiting bot.

pull/316/merge
Rapptz 8 years ago
parent
commit
fc1a7183a0
  1. 6
      discord/ext/commands/bot.py

6
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

Loading…
Cancel
Save