aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-01-23 06:17:41 +0100
committerGravatar Numerlor <[email protected]>2021-01-23 06:17:41 +0100
commitf91c1595c80fe68a4e9261ce5277f8d2e94ccfa2 (patch)
treeab12259173fb455a46ac132264bf7b43c64f2801
parentAvoid errors when the first element is longer than the truncation index (diff)
Wrap whole string in shorten
This helps avoid subtracting the length of "Moved: " from the shorten index Co-authored-by: MarkKoz <[email protected]>
-rw-r--r--bot/exts/info/doc/_cog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py
index 430e8ebcb..a074d8daa 100644
--- a/bot/exts/info/doc/_cog.py
+++ b/bot/exts/info/doc/_cog.py
@@ -271,7 +271,7 @@ class DocCog(commands.Cog):
# with a max of 100 chars.
if symbol in self.renamed_symbols:
renamed_symbols = ', '.join(self.renamed_symbols[symbol])
- footer_text = f"Moved: {textwrap.shorten(renamed_symbols, 100-7, placeholder=' ...')}"
+ footer_text = textwrap.shorten("Moved: " + renamed_symbols, 100, placeholder=' ...')
else:
footer_text = ""
embed.set_footer(text=footer_text)