aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-12-01 01:48:53 -0600
committerParker <contact@pkrm.dev>2024-12-01 01:48:53 -0600
commit9f7c2860787a9312f1fedac69eb69f19ad52b363 (patch)
treea99b0e5c8c6065f02483e4f11e4a21e4e324fb3c
parentfa9a78314ff112df7b6f482328e784c8031d923f (diff)
Tidy up unused variable/old logic
-rw-r--r--code/cogs/skip.py35
1 files changed, 15 insertions, 20 deletions
diff --git a/code/cogs/skip.py b/code/cogs/skip.py
index d1f1dfb..7bed931 100644
--- a/code/cogs/skip.py
+++ b/code/cogs/skip.py
@@ -49,26 +49,21 @@ class Skip(commands.Cog):
for i in range(number - 2, -1, -1):
player.queue.pop(i)
- # If there is a next song, get it
- try:
- next_song = player.queue[0]
- except IndexError:
- # If the song is on repeat, catch the IndexError and get the current song
- # Otherwise, pass
- if player.loop == 1:
- embed = create_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."
- ),
- )
- return await interaction.response.send_message(
- embed=embed, ephemeral=True
- )
- else:
- pass
+ # If the queue is empty, but the current song is on repeat
+ if player.loop == 1 and not player.queue:
+ embed = create_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."
+ ),
+ )
+ return await interaction.response.send_message(
+ embed=embed, ephemeral=True
+ )
+ else:
+ pass
# Skip current track, continue skipping on LoadError
while True: