From 34510f52c6bbe5e2a8bbfc34f8e5d648d0d39a96 Mon Sep 17 00:00:00 2001 From: Numerlor Date: Sun, 10 Nov 2019 20:03:48 +0100 Subject: Move paragraph search to not cut off long starting paragraphs Co-authored-by: scargly <29337040+scragly@users.noreply.github.com> --- bot/cogs/doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py index b04355e28..73895e3eb 100644 --- a/bot/cogs/doc.py +++ b/bot/cogs/doc.py @@ -304,7 +304,7 @@ class Doc(commands.Cog): # of a double newline (interpreted as a paragraph) before index 1000. if len(description) > 1000: shortened = description[:1000] - last_paragraph_end = shortened.rfind('\n\n') + last_paragraph_end = shortened.rfind('\n\n', 100) if last_paragraph_end == -1: last_paragraph_end = 1000 description = description[:last_paragraph_end] -- cgit v1.2.3