remove excess lines from non-embed notifications

This commit is contained in:
Infinidoge 2025-01-01 18:36:20 -05:00
parent c507bafa87
commit 0187890dc1
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E

View file

@ -73,13 +73,13 @@ async def handle_notification(db_updates, ctx, message, keyword, user_id, use_em
log.debug("Sending plain message")
paginator = Paginator(prefix="", suffix="")
paginator.add_line(header)
paginator.add_line(empty=True)
paginator.add_line()
for line in indent(message.content, "> ", lambda line: True).strip().split("\n"):
if len(line) < 1990:
paginator.add_line(line)
else:
paginator.add_line(line[:1975] + " (... Line too long)")
paginator.add_line(empty=True)
paginator.add_line()
paginator.add_line(footer)
try:
for page in paginator.pages: