Skip to content

Commit 94da11e

Browse files
fix(paginator): allow titles even if embed is None
1 parent f00c2e5 commit 94da11e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

modmail/utils/pagination.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ def __init__(
9292

9393
# used if embed is None
9494
self.content = ""
95-
if embed is not None:
96-
if title:
97-
raise TypeError("Cannot set title if embed is None.")
98-
self.title = None
99-
else:
95+
if embed is None:
10096
self.title = title
10197
# need to set the max_size down a few to be able to set a "footer"
10298
# page indicator is "page xx of xx"
@@ -301,7 +297,6 @@ async def send_page(self, interaction: Interaction) -> None:
301297
if self.embed:
302298
await interaction.message.edit(embed=self.embed, view=self)
303299
else:
304-
print(len(self.content))
305300
await interaction.message.edit(content=self.content, view=self)
306301

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

0 commit comments

Comments
 (0)