diff --git a/discord/ext/commands/formatter.py b/discord/ext/commands/formatter.py index 4451a4ce2..45ed83502 100644 --- a/discord/ext/commands/formatter.py +++ b/discord/ext/commands/formatter.py @@ -104,7 +104,9 @@ class HelpFormatter: the largest subcommand name.""" try: commands = self.command.commands if not self.is_cog() else self.context.bot.commands - return max(map(lambda c: len(c.name), commands.values())) + if commands: + return max(map(lambda c: len(c.name), commands.values())) + return 0 except AttributeError: return len(self.command.name)