aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--code/cogs/skip.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/code/cogs/skip.py b/code/cogs/skip.py
index eca27b5..5a57554 100644
--- a/code/cogs/skip.py
+++ b/code/cogs/skip.py
@@ -6,6 +6,7 @@ from cogs.music import Music
import asyncio
from global_variables import BOT_COLOR
+from custom_source import LoadError
class Skip(commands.Cog):
@@ -38,8 +39,13 @@ class Skip(commands.Cog):
else:
for i in range(number - 2, -1, -1):
player.queue.pop(i)
-
- await player.skip()
+ # 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.
+ try:
+ await player.skip()
+ except LoadError:
+ pass
+ await player.skip()
if not player.current:
embed = discord.Embed(