properly handle single lines being too long
This commit is contained in:
parent
522a2ee204
commit
c507bafa87
1 changed files with 5 additions and 2 deletions
|
@ -75,9 +75,12 @@ async def handle_notification(db_updates, ctx, message, keyword, user_id, use_em
|
|||
paginator.add_line(header)
|
||||
paginator.add_line(empty=True)
|
||||
for line in indent(message.content, "> ", lambda line: True).strip().split("\n"):
|
||||
paginator.add_line(line)
|
||||
if len(line) < 1990:
|
||||
paginator.add_line(line)
|
||||
else:
|
||||
paginator.add_line(line[:1975] + " (... Line too long)")
|
||||
paginator.add_line(empty=True)
|
||||
paginator.add_file(footer)
|
||||
paginator.add_line(footer)
|
||||
try:
|
||||
for page in paginator.pages:
|
||||
await member.send(page)
|
||||
|
|
Loading…
Reference in a new issue