Black paginator.py with 120 char limit per line
This commit is contained in:
parent
c74fd90a9c
commit
fae85d072f
@ -91,11 +91,7 @@ async def paginate(ctx, pages: list, title: str = None):
|
|||||||
if view.value == "right":
|
if view.value == "right":
|
||||||
index += 1
|
index += 1
|
||||||
current_page = pages[index]
|
current_page = pages[index]
|
||||||
view = (
|
view = MiddlePageComps(ctx.author.id) if current_page != last_page else LastPageComps(ctx.author.id)
|
||||||
MiddlePageComps(ctx.author.id)
|
|
||||||
if current_page != last_page
|
|
||||||
else LastPageComps(ctx.author.id)
|
|
||||||
)
|
|
||||||
embed = current_page
|
embed = current_page
|
||||||
if title:
|
if title:
|
||||||
embed.title = f"{title} | Page {index+1}/{total_pages}"
|
embed.title = f"{title} | Page {index+1}/{total_pages}"
|
||||||
@ -103,11 +99,7 @@ async def paginate(ctx, pages: list, title: str = None):
|
|||||||
elif view.value == "left":
|
elif view.value == "left":
|
||||||
index -= 1
|
index -= 1
|
||||||
current_page = pages[index]
|
current_page = pages[index]
|
||||||
view = (
|
view = MiddlePageComps(ctx.author.id) if current_page != first_page else FirstPageComps(ctx.author.id)
|
||||||
MiddlePageComps(ctx.author.id)
|
|
||||||
if current_page != first_page
|
|
||||||
else FirstPageComps(ctx.author.id)
|
|
||||||
)
|
|
||||||
embed = current_page
|
embed = current_page
|
||||||
if title:
|
if title:
|
||||||
embed.title = f"{title} | Page {index+1}/{total_pages}"
|
embed.title = f"{title} | Page {index+1}/{total_pages}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user