diff options
| author | 2019-11-10 19:43:56 +0100 | |
|---|---|---|
| committer | 2019-11-10 19:43:56 +0100 | |
| commit | 4795da86d0fef72ac677ae0a8f9e988da1923e17 (patch) | |
| tree | 0715a904f3b99381b8c1b2c8315fbb3a50fca068 | |
| parent | Add a newline after signatures for readability (diff) | |
Cut off description at 1000 chars if paragraph is not found
| -rw-r--r-- | bot/cogs/doc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py index 653d48528..b04355e28 100644 --- a/bot/cogs/doc.py +++ b/bot/cogs/doc.py @@ -305,6 +305,8 @@ class Doc(commands.Cog): if len(description) > 1000: shortened = description[:1000] last_paragraph_end = shortened.rfind('\n\n') + if last_paragraph_end == -1: + last_paragraph_end = 1000 description = description[:last_paragraph_end] # If there is an incomplete code block, cut it out |