diff options
| author | PapyrusThePlant <[email protected]> | 2016-07-13 10:04:41 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-07-30 13:27:41 -0400 |
| commit | 3ec9b7fb979c8fc97073fd97bff953e83d80ae9a (patch) | |
| tree | 2772300fe710844cc046438da6343dffda0f851b | |
| parent | Rename Permissions.change_nicknames to change_nickname to match UI. (diff) | |
| download | discord.py-3ec9b7fb979c8fc97073fd97bff953e83d80ae9a.tar.xz discord.py-3ec9b7fb979c8fc97073fd97bff953e83d80ae9a.zip | |
[commands] Make HelpFormatter ignore hidden commands for max_width.
| -rw-r--r-- | discord/ext/commands/formatter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/formatter.py b/discord/ext/commands/formatter.py index 452fd40e..b00139b7 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) |