Skip to content

Commit

Permalink
Remove on_wavelink_track_end trying to disconnect after inactivity
Browse files Browse the repository at this point in the history
Soon wavelink will have built in event for inactivity and the current solution is buggy
  • Loading branch information
jackra1n committed Jan 7, 2024
1 parent 6e7d91e commit 93c0a94
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions bot/cogs/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ async def _update_controller(self, player: wavelink.Player):
except discord.NotFound:
pass

@commands.Cog.listener()
async def on_wavelink_track_end(self, payload: wavelink.TrackEndEventPayload):
player: wavelink.Player = payload.player
if player.queue:
return
try:
await self.bot.wait_for('wavelink_track_end', timeout=300)
except asyncio.TimeoutError:
await player.disconnect()

async def cog_before_invoke(self, ctx: commands.Context):
""" Command before-invoke handler. """
guild_check = ctx.guild is not None
Expand Down

0 comments on commit 93c0a94

Please sign in to comment.