From b0abfc6cf6a093704dfb97e63f733d7852106587 Mon Sep 17 00:00:00 2001 From: Florian Baumann Date: Sat, 16 Jul 2016 21:34:35 +1200 Subject: trui --- __init__.py | 8 ++++++-- 1 file 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])) -- cgit v1.2.3