[3.4] [Audio] Add a wait time before auto disconnect (#5188) (#5259)

* Update lavalink.py

* Add comment

(cherry picked from commit 43071e3fa2)

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2021-09-08 21:21:44 +02:00
committed by GitHub
parent cbb5ffe252
commit 08bbf8f6db

View File

@@ -215,6 +215,8 @@ class LavalinkEvents(MixinMeta, metaclass=CompositeMetaClass):
await self.config.guild_from_id(
guild_id=guild_id
).currently_auto_playing_in.set([])
# let audio buffer run out on slower machines (GH-5158)
await asyncio.sleep(2)
await player.disconnect()
self._ll_guild_updates.discard(guild.id)
if status: