aboutsummaryrefslogtreecommitdiffstats
path: root/jeeves/helpstrings.py
diff options
context:
space:
mode:
authorAhmed <git@gumx.cc>2026-06-14 01:46:29 +0300
committerAhmed <git@gumx.cc>2026-06-14 01:46:29 +0300
commit5a8d568931d9b23ce0df1265d05259a7012081c9 (patch)
tree4ea19b8bb1763a38246f342f172c285f6579e09b /jeeves/helpstrings.py
init: mostly vibed
Diffstat (limited to 'jeeves/helpstrings.py')
-rw-r--r--jeeves/helpstrings.py100
1 files changed, 100 insertions, 0 deletions
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 <on/off> - 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 <url> - 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 <on/off> 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 <name> - full recipe: name, ingredients, steps",
+}
+
+_NEWS = {
+ "weather": "!weather <city> - current weather conditions",
+ "forecast": "!forecast <city> - 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 <text> (op); !quote del <N> (op); !quote list",
+ "quotes": "!quotes - show auto-post state; !quotes on/off to toggle (op)",
+}
+
+_ART = {
+ "draw": "!draw [<lines>] <url> - render image as mIRC colour art (lines 4-12, default from !set art_height)",
+}
+
+_CONFIG = {
+ "set": "!set <key> <value> - 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 <cmd> for usage", _ADMIN),
+ "dj": ("dj: dj, np, queue, loop, play, stop, skip, remove, clear. type !help <cmd> for usage", _DJ),
+ "duck": ("duck: bang, reload, score, hunt. type !help <cmd> for usage", _DUCK),
+ "recipes": ("recipes: breakfast, lunch, dinner, snack, recipe. type !help <cmd> for usage", _RECIPES),
+ "news": ("news: weather, forecast, headlines, news. type !help <cmd> for usage", _NEWS),
+ "quotes": ("quotes: quote, quotes. type !help <cmd> for usage", _QUOTES),
+ "art": ("art: draw. type !help <cmd> for usage", _ART),
+ "config": ("config: set, config. type !help <cmd> 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 <topic> or !help <cmd> 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)