""" Sopel plugin: jeeves help Three-level help system: !help - topics overview !help - commands in that topic !help - command description !help - same as above """ import os as _os, sys as _sys _d = _os.path.dirname(_os.path.abspath(__file__)) if _d not in _sys.path: _sys.path.insert(0, _d) import jv_core as jv import helpstrings as h from sopel import plugin def setup(bot): jv.ensure_setup(bot) @plugin.command("help") def cmd_help(bot, trigger): args = (trigger.group(2) or "").split() result = h.lookup(args) if result: bot.notice(result, trigger.nick) else: bot.notice(f"no help for '{' '.join(args)}'. {h.TOPICS}", trigger.nick)