mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user