mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -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:
@@ -38,7 +38,10 @@ class Command(commands.Command):
|
||||
translator = lambda s: s
|
||||
else:
|
||||
translator = self.translator
|
||||
return inspect.cleandoc(translator(self.callback.__doc__))
|
||||
command_doc = self.callback.__doc__
|
||||
if command_doc is None:
|
||||
return ''
|
||||
return inspect.cleandoc(translator(command_doc))
|
||||
|
||||
@help.setter
|
||||
def help(self, value):
|
||||
|
||||
Reference in New Issue
Block a user