diff options
author | Parker <contact@pkrm.dev> | 2024-10-30 21:37:45 -0500 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-10-30 21:37:45 -0500 |
commit | f4c855b2de7efdcc84605298fa1d37a87cc7782d (patch) | |
tree | 9fb4815de6241a5fac19e3e04fcb1dcd77917deb /code/cogs/skip.py | |
parent | 8d0fc5b7d1ac4709c02ebae8a6a5c364ef05b8bb (diff) |
Catch issue if song on repeat is skipped w/ nothing in queue
Diffstat (limited to 'code/cogs/skip.py')
-rw-r--r-- | code/cogs/skip.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/code/cogs/skip.py b/code/cogs/skip.py index e833bfa..2402510 100644 --- a/code/cogs/skip.py +++ b/code/cogs/skip.py @@ -44,7 +44,17 @@ class Skip(commands.Cog): try: next_song = player.queue[0] except IndexError: - pass + # If the song is on repeat, catch the IndexError and get the current song + # Otherwise, pass + if player.repeat: + embed = discord.Embed( + title="Song on Repeat", + description="There is nothing in queue, but the current song is on repeat. Use </stop:1224840890866991305> to stop playing music.", + color=BOT_COLOR, + ) + return await interaction.response.send_message(embed=embed, ephemeral=True) + else: + pass # Sometimes when a playlist/album of custom source tracks are loaded, one is not able to be found # so, when a user attempts to skip to that track, we get a LoadError. In this case, just pass it. |