def help(self, message, params=None, **kwargs): """Learn how to use plugins (ex: .help <command>).""" if params: doc = _find_doc_string(params) if doc: message.dispatch(doc) else: message.dispatch("No help available: %s" % params) else: active_commands = plugin.active_commands() active_keywords = plugin.active_keywords() active_patterns = plugin.active_msg_regexs() active_pollers = plugin.active_polls() message.dispatch(self.help.__doc__) if len(active_commands) > 0: message.dispatch("Active Commands: %s" % active_commands) if len(active_keywords) > 0: message.dispatch("Active Keywords: %s" % active_keywords) if len(active_patterns) > 0: message.dispatch("Active Patterns: %s" % active_patterns) if len(active_pollers) > 0: message.dispatch("Active Pollers: %s" % active_pollers)
def help(self, message, params=None, **kwargs): """Learn how to use active commands (ex: .help <command>).""" if params: doc = _find_doc_string(params) if doc: message.dispatch(doc) else: message.dispatch("No help available for '%s'" % params) else: message.dispatch(self.help.__doc__) message.dispatch("Active Commands: %s" % plugin.active_commands()) message.dispatch("Active Keywords: %s" % plugin.active_keywords())