From 6c4e5af5ee85a8c9f3930d70667d6f814c4547b2 Mon Sep 17 00:00:00 2001 From: Kowlin Date: Tue, 2 Nov 2021 19:53:42 +0100 Subject: [PATCH] Check to avoid an IndexError (#5429) --- redbot/cogs/audio/core/commands/queue.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redbot/cogs/audio/core/commands/queue.py b/redbot/cogs/audio/core/commands/queue.py index 323b1ddb6..375bdf9b5 100644 --- a/redbot/cogs/audio/core/commands/queue.py +++ b/redbot/cogs/audio/core/commands/queue.py @@ -37,6 +37,10 @@ class QueueCommands(MixinMeta, metaclass=CompositeMetaClass): async def command_queue(self, ctx: commands.Context, *, page: int = 1): """List the songs in the queue.""" + # Check to avoid an IndexError further down in the code. + if page < 1: + page = 1 + async def _queue_menu( ctx: commands.Context, pages: list,