Skip to content

Commit

Permalink
Add on_wavelink_inactive_player
Browse files Browse the repository at this point in the history
  • Loading branch information
jackra1n committed Jan 7, 2024
1 parent a0d5e88 commit 7dd0317
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bot/cogs/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7dd0317

Please sign in to comment.