diff options
Diffstat (limited to '__init__.py')
-rw-r--r-- | __init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/__init__.py b/__init__.py index da0557a..f1eae7c 100644 --- a/__init__.py +++ b/__init__.py @@ -349,12 +349,16 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin): if (len(cmd) == 0 or cmd[0] == 'all'): lines.append("Available commands:") for (attr, fn) in self.__dict__.items(): - if (attr.startswith('_cmd_') and hasattr(fn, 'xmpp_cmd') and not fn.hidden): - lines.append("{} - {}".format(fn.xmpp_cmd, fn.desc)) + if (hasattr(fn, 'xmpp_cmd') and not fn.hidden): + lines.append("{} - {}".format(fn.xmpp_cmd, fn.usage)) + if (fn.desc): + lines.append("* {}\n".format(fn.desc)) else: fn = getattr(self, "_cmd_{}".format(cmd[0]), None) if (fn and hasattr(fn, 'xmpp_cmd')): lines.append("{} - {}".format(fn.xmpp_cmd, fn.desc)) + if (fn.desc): + lines.append("* {}".format(fn.desc)) else: lines.append("{} not an available command.".format(cmd[0])) |