mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Properly cleanup of VoiceClients in cache.
This commit is contained in:
@ -240,6 +240,12 @@ class AutoShardedClient(Client):
|
||||
|
||||
self._closed.set()
|
||||
|
||||
for vc in self.voice_clients:
|
||||
try:
|
||||
yield from vc.disconnect()
|
||||
except:
|
||||
pass
|
||||
|
||||
to_close = [shard.ws.close() for shard in self.shards.values()]
|
||||
yield from asyncio.wait(to_close, loop=self.loop)
|
||||
yield from self.http.close()
|
||||
|
Reference in New Issue
Block a user