Check to avoid an IndexError (#5429)

This commit is contained in:
Kowlin 2021-11-02 19:53:42 +01:00 committed by GitHub
parent 3f4842603b
commit 6c4e5af5ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,10 @@ class QueueCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_queue(self, ctx: commands.Context, *, page: int = 1): async def command_queue(self, ctx: commands.Context, *, page: int = 1):
"""List the songs in the queue.""" """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( async def _queue_menu(
ctx: commands.Context, ctx: commands.Context,
pages: list, pages: list,