Skip to content

Commit

Permalink
fix(paginator): allow titles even if embed is None
Browse files Browse the repository at this point in the history
  • Loading branch information
onerandomusername committed Dec 2, 2021
1 parent f00c2e5 commit 94da11e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modmail/utils/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ def __init__(

# used if embed is None
self.content = ""
if embed is not None:
if title:
raise TypeError("Cannot set title if embed is None.")
self.title = None
else:
if embed is None:
self.title = title
# need to set the max_size down a few to be able to set a "footer"
# page indicator is "page xx of xx"
Expand Down Expand Up @@ -301,7 +297,6 @@ async def send_page(self, interaction: Interaction) -> None:
if self.embed:
await interaction.message.edit(embed=self.embed, view=self)
else:
print(len(self.content))
await interaction.message.edit(content=self.content, view=self)

@ui.button(label=JUMP_FIRST_LABEL, custom_id="pag_jump_first", style=ButtonStyle.primary)
Expand Down

0 comments on commit 94da11e

Please sign in to comment.