From 3ec9b7fb979c8fc97073fd97bff953e83d80ae9a Mon Sep 17 00:00:00 2001 From: PapyrusThePlant Date: Wed, 13 Jul 2016 10:04:41 +0200 Subject: [PATCH] [commands] Make HelpFormatter ignore hidden commands for max_width. --- discord/ext/commands/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/formatter.py b/discord/ext/commands/formatter.py index 452fd40e6..b00139b7c 100644 --- a/discord/ext/commands/formatter.py +++ b/discord/ext/commands/formatter.py @@ -160,7 +160,7 @@ class HelpFormatter: try: commands = self.command.commands if not self.is_cog() else self.context.bot.commands if commands: - return max(map(lambda c: len(c.name), commands.values())) + return max(map(lambda c: len(c.name) if self.show_hidden or not c.hidden else 0, commands.values())) return 0 except AttributeError: return len(self.command.name)