From 7dd0317707492a75288e130b6ac33e3e3840fd67 Mon Sep 17 00:00:00 2001 From: jackra1n <45038833+jackra1n@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:06:53 +0100 Subject: [PATCH] Add on_wavelink_inactive_player --- bot/cogs/music.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/cogs/music.py b/bot/cogs/music.py index e047a63..40866da 100644 --- a/bot/cogs/music.py +++ b/bot/cogs/music.py @@ -39,6 +39,10 @@ def is_bot_last_vc_member(self, channel: discord.VoiceChannel): return all(member.bot for member in channel.members) return False + @commands.Cog.listener() + async def on_wavelink_inactive_player(self, player: wavelink.Player) -> None: + await player.disconnect() + @commands.Cog.listener() async def on_wavelink_track_start(self, payload: wavelink.TrackStartEventPayload): player: wavelink.Player = payload.player