diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/doc.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py index c1bb4ad41..16a690f39 100644 --- a/bot/cogs/doc.py +++ b/bot/cogs/doc.py @@ -306,17 +306,17 @@ 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', 100) + description_cutoff = shortened.rfind('\n\n', 100) # Search the shortened version for cutoff points in decreasing desirability, # cutoff at 1000 if none are found. - if last_paragraph_end == -1: + if description_cutoff == -1: for string in (". ", ", ", ",", " "): - last_paragraph_end = shortened.rfind(string) - if last_paragraph_end != -1: + description_cutoff = shortened.rfind(string) + if description_cutoff != -1: break else: - last_paragraph_end = 1000 - description = description[:last_paragraph_end] + description_cutoff = 1000 + description = description[:description_cutoff] # If there is an incomplete code block, cut it out if description.count("```") % 2: |