Repository navigation
Consolidate quips into quips.py; ambient -# subtext on every reply - #10
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
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>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 botsubmenu).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 agenericfallback for errors and edge cases)BOT— the bot-directed pools, resolved asbot:<action>when an action is aimed at Matrimony itself (addedrestrainandblock)UNKNOWN,RESTRAIN,JAIL,RELEASE,DISSOLVE,HELPPICKUP_LINES,DATE_IDEAS,anniversary_note()quip(kind, rng=None)(seedablerng.choice, else deterministic rotation) andsubtext(text, kind)returningf"{text}\n-# {quip(kind)}"Wiring —
_say,_respondand_embedtake aquipkind 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 tobot:<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_commandsscans 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 whilesay !matr partnersmid-line stays chatter. Trailing lines after the command are never read as arguments.!matr help bot—helptakes an optional topic;botshows 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 advertiseshelp [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 ambientfunpool; 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 thehelp botsubmenu.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