Skip to content

Consolidate quips into quips.py; ambient -# subtext on every reply - #10

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1792344110-quip-overhaul
Open

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1792344110-quip-overhaul

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

All quips are consolidated into a single dedicated module, matrimony/quips.py, every command reply now ends with one ambient -# <quip> Discord-subtext line, and the parser picks up commands on any line of a message (plus a !matr help bot submenu).

The quip module organizes every pool by section/action/theme:

  • AMBIENT — per-command/theme pools (proposal, married, divorce, adopt, disown, emancipate, abandon, tree, kin, block, law, admin, meta, fun, ship, flirt, date, anniversary, jailwed, notice, expired, plus a generic fallback for errors and edge cases)
  • BOT — the bot-directed pools, resolved as bot:<action> when an action is aimed at Matrimony itself (added restrain and block)
  • Situational pools: UNKNOWN, RESTRAIN, JAIL, RELEASE, DISSOLVE, HELP
  • Command payload material: PICKUP_LINES, DATE_IDEAS, anniversary_note()
  • The rotation machinery and the formatting helper: quip(kind, rng=None) (seedable rng.choice, else deterministic rotation) and subtext(text, kind) returning f"{text}\n-# {quip(kind)}"

Wiring — _say, _respond and _embed take a quip kind that appends the subtext line; the reply helpers default to "generic" so errors quip too. Each command passes its own pool, and _quip_kind() swaps to bot:<kind> when the target is Matrimony. Non-conforming spots were normalized to the same end-of-message -# format: the jail-block message (previously an inline quip), the jail-dissolution notice lines (quips now on their own lines), and the unknown-action reply content (now -# <quip> rather than a bare quip).

Multi-line commands — process_commands scans the message for the first line that starts with a command prefix (leading whitespace tolerated) and feeds just that line to the parser, so "hey all\n!matr partners" runs the command while say !matr partners mid-line stays chatter. Trailing lines after the command are never read as arguments.

!matr help bot — help takes an optional topic; bot shows a bot-focused submenu (prefix/mention forms, multi-line commands, slash parity, bots-as-first-class, global trees) ending with the same -# wisdom line. Any other topic falls back to the full command list, which now advertises help [bot].

Tests — quip test imports updated to the new module; !matr <unknown> assertions now check -# -prefixed content; the fun-at-normal-user test now asserts the ambient fun pool; new coverage: ambient quips on ordinary/error replies, commands on later/indented lines vs. mid-line and multiline non-commands, trailing-line arguments, mention prefix on a later line, and the help bot submenu. pytest: 199 passed; ruff: clean.

Link to Devin session: https://app.devin.ai/sessions/dc0d6f8305ae40de94ff0a074a110d17
Open in Devin Desktop: https://app.devin.ai/desktop/session/dc0d6f8305ae40de94ff0a074a110d17?variant=devin
Requested by: @CommunityPoke

All quip content moves to a single dedicated module, matrimony/quips.py,
organized by command/theme: ambient pools per action, the bot-directed
pools, situational pools (unknown commands, restraining orders, jail,
releases, dissolutions), the help wisdom list, pickup lines, date ideas,
and the anniversary notes - plus the rotation machinery and a subtext()
helper that appends the standard Discord subtext line.

Every command reply now ends with one ambient '-# ' quip line: _say,
_respond and _embed take a quip kind (defaulting to the generic pool),
each command passes its own pool, and actions aimed at Matrimony itself
draw from the bot: pools instead. The jail-block message, dissolution
notices and the unknown-action reply are normalized to the same
end-of-message -# format.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

- process_commands now scans the message lines for the first one that
  starts with a command prefix (leading whitespace tolerated) and feeds
  just that line to the parser, so 'chatter\n!matr partners' runs the
  command and trailing lines are never read as arguments. Mid-line
  prefixes ('say !matr help') are still ignored.
- 'matr help' takes an optional topic: 'help bot' shows a bot-focused
  submenu (prefix/mention forms, multi-line commands, slash parity,
  bots-as-first-class, global trees); any other topic falls back to the
  full command list. The main help embed now advertises 'help [bot]'.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant