[Audio] Disconnect from all VCs on cog unload

This commit is contained in:
Twentysix 2017-04-18 12:20:14 +02:00
parent 8be3d978be
commit 6b725560f6

View File

@ -2160,6 +2160,10 @@ class Audio:
log.debug("just got unmuted, resuming") log.debug("just got unmuted, resuming")
vc.audio_player.resume() vc.audio_player.resume()
def __unload(self):
for vc in self.bot.voice_clients:
self.bot.loop.create_task(vc.disconnect())
def check_folders(): def check_folders():
folders = ("data/audio", "data/audio/cache", "data/audio/playlists", folders = ("data/audio", "data/audio/cache", "data/audio/playlists",