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/helpstrings.py | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 jeeves/helpstrings.py (limited to 'jeeves/helpstrings.py') diff --git a/jeeves/helpstrings.py b/jeeves/helpstrings.py new file mode 100644 index 0000000..bf4b27e --- /dev/null +++ b/jeeves/helpstrings.py @@ -0,0 +1,100 @@ +""" +Jeeves help string constants. Not loaded directly by Sopel. +Imported via sys.path insertion by help.py. +""" + +_ADMIN = { + "join": "!join #channel - join a channel (owner)", + "part": "!part [#channel] - leave a channel, defaults to current (owner)", + "chans": "!chans - list channels the bot is currently in (owner)", + "follow": "!follow - follow owner into channels every 30s (owner)", + "unfollow": "!unfollow - leave all follow-joined channels immediately (owner)", + "pause": "!pause - pause keyword responses (owner)", + "resume": "!resume - resume keyword responses (owner)", +} + +_DJ = { + "dj": "!dj - queue a YouTube URL (shorts, embeds, live not accepted)", + "np": "!np - show currently playing track", + "queue": "!queue - list up to 4 upcoming tracks", + "loop": "!loop - show loop state; !loop to change (op)", + "play": "!play - start or resume playback (op)", + "stop": "!stop - pause playback (op)", + "skip": "!skip - skip to next track (op)", + "remove": "!remove - remove current track from queue (op)", + "clear": "!clear - clear queue and stop playback (op)", +} + +_DUCK = { + "bang": "!bang - fire at the current duck", + "reload": "!reload - refill ammo, 3s cooldown", + "score": "!score - top 5 for this channel; !score clear to reset (op/owner)", + "hunt": "!hunt - show hunt state (includes spawn/flee times); !hunt start|stop to control (op); timing via !set duck_spawn_min/max/flee_time", +} + +_RECIPES = { + "breakfast": "!breakfast [list] - random breakfast suggestion or list all", + "lunch": "!lunch [list] - random lunch suggestion or list all", + "dinner": "!dinner [list] - random dinner suggestion or list all", + "snack": "!snack [list] - random snack suggestion or list all", + "recipe": "!recipe - full recipe: name, ingredients, steps", +} + +_NEWS = { + "weather": "!weather - current weather conditions", + "forecast": "!forecast - 3-day weather forecast", + "headlines": "!headlines [global/mena/egypt] [count] - latest headlines", + "news": "!news - show broadcast state; !news on/off to toggle (op)", +} + +_QUOTES = { + "quote": "!quote - random quote; !quote add (op); !quote del (op); !quote list", + "quotes": "!quotes - show auto-post state; !quotes on/off to toggle (op)", +} + +_ART = { + "draw": "!draw [] - render image as mIRC colour art (lines 4-12, default from !set art_height)", +} + +_CONFIG = { + "set": "!set - set a config value (in channel: per-channel; in PM: global, owner only)", + "config": "!config [#channel] - show all config values for a channel", +} + +TOPIC_MAP = { + "admin": ("admin: join, part, chans, follow, unfollow, pause, resume. type !help for usage", _ADMIN), + "dj": ("dj: dj, np, queue, loop, play, stop, skip, remove, clear. type !help for usage", _DJ), + "duck": ("duck: bang, reload, score, hunt. type !help for usage", _DUCK), + "recipes": ("recipes: breakfast, lunch, dinner, snack, recipe. type !help for usage", _RECIPES), + "news": ("news: weather, forecast, headlines, news. type !help for usage", _NEWS), + "quotes": ("quotes: quote, quotes. type !help for usage", _QUOTES), + "art": ("art: draw. type !help for usage", _ART), + "config": ("config: set, config. type !help for usage", _CONFIG), +} + +TOPICS = ( + "topics (commands): " + "admin (join, part, chans, follow, unfollow, pause, resume), " + "dj (dj, np, queue, loop, play, stop, skip, remove, clear), " + "duck (bang, reload, score, hunt), " + "recipes (breakfast, lunch, dinner, snack, recipe), " + "news (weather, forecast, headlines, news), " + "quotes (quote, quotes), " + "art (draw), " + "config (set, config). " + "type !help or !help to know more" +) + +_ALL = {**_ADMIN, **_DJ, **_DUCK, **_RECIPES, **_NEWS, **_QUOTES, **_ART, **_CONFIG} + + +def lookup(args): + if not args: + return TOPICS + first = args[0].lower() + if first in TOPIC_MAP: + if len(args) == 1: + return TOPIC_MAP[first][0] + cmd = args[1].lower() + return TOPIC_MAP[first][1].get(cmd) + return _ALL.get(first) -- cgit v1.2.3