From f91c1595c80fe68a4e9261ce5277f8d2e94ccfa2 Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Sat, 23 Jan 2021 06:17:41 +0100 Subject: Wrap whole string in shorten This helps avoid subtracting the length of "Moved: " from the shorten index Co-authored-by: MarkKoz --- bot/exts/info/doc/_cog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3