[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:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
for cog in self.cogs:
|
||||||
|
try:
|
||||||
|
self.remove_cog(cog)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
yield from super().close()
|
yield from super().close()
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user