From 5a8d568931d9b23ce0df1265d05259a7012081c9 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Sun, 14 Jun 2026 01:46:29 +0300 Subject: init: mostly vibed --- jeeves/help.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 jeeves/help.py (limited to 'jeeves/help.py') diff --git a/jeeves/help.py b/jeeves/help.py new file mode 100644 index 0000000..ac953ff --- /dev/null +++ b/jeeves/help.py @@ -0,0 +1,32 @@ +""" +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) -- cgit v1.2.3