mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 02:09:49 +00:00
[commands] Make HelpFormatter ignore hidden commands for max_width.
This commit is contained in:
parent
cfca7eb1f8
commit
3ec9b7fb97
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user