Skip to content

Commit

Permalink
fix(lava/cogs/events.py): updated player.update_display method to inc…
Browse files Browse the repository at this point in the history
…lude sending a new message if the player's channel is available, handling AttributeError exceptions.
  • Loading branch information
Nat1anWasTaken committed Jun 14, 2024
1 parent 28d1fb8 commit 0610d36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lava/cogs/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ async def on_track_end(self, event: TrackEndEvent):
self.bot.logger.info("Received track end event for guild %s", player.guild)

try:
await player.update_display()
await player.update_display(new_message=await player.message.channel.send("..."))
except ValueError:
pass
except AttributeError:
pass

async def on_queue_end(self, event: QueueEndEvent):
player: LavaPlayer = event.player
Expand Down

0 comments on commit 0610d36

Please sign in to comment.