[V3] fix help on missing cog and command docstrings (#1645)

* [V3] fix help on missing cog docstrings

* I think this is what you're looking for

* Also do a NoneType check for commands
This commit is contained in:
Michael H
2018-05-14 06:13:12 -04:00
committed by Tobotimus
parent cbbeb412f9
commit e7476edd68
2 changed files with 9 additions and 2 deletions

View File

@@ -136,7 +136,11 @@ class Help(formatter.HelpFormatter):
if self.is_cog():
translator = getattr(self.command, '__translator__', lambda s: s)
description = inspect.cleandoc(translator(self.command.__doc__))
description = (
inspect.cleandoc(translator(self.command.__doc__))
if self.command.__doc__
else EMPTY_STRING
)
else:
description = self.command.description