Repository navigation
Matrimony: MarriageBot-style family-tree Discord bot (with bot-account support) - #1
Merged
Merged
Conversation
- !matr command group: marry/divorce/partners, adopt/makeparent/disown/ disownall/emancipate/abandon, tree/fulltree/relationship/familysize, block/unblock, per-guild prefix, incest toggle, force* admin commands, fun commands, info/invite/stats - Global cross-server SQLite family store; one parent per child; proposal flow with buttons + accept/decline text commands - Bot accounts supported end-to-end: no blanket author.bot exclusion, only self-message loop guard; tests cover bot-authored commands - 37 unit tests (store, family graph, dispatch, proposal flows), ruff config, CI, Dockerfile, .env.example, full README Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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)".
|
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
Implements Matrimony, a MarriageBot-style family-tree Discord bot in discord.py, modeled on the original upstream bot (Voxel-Fox-Ltd/MarriageBot) with two deliberate additions: the requested
!matr <action> <params>prefix-command surface and first-class bot-account support (humans marry bots, bots marry humans, bots marry bots, bot adoptions).Mechanics (mirroring upstream)
matrimony/store.py):partnersedges (unordered pairs),childrenedges (one parent per child, upstream's model),proposals,blocks,guild_settings.marry/adopt/makeparentcreate a proposal; the target consents via Accept/Decline buttons oraccept/declinetext commands (text responses also let non-UI bots answer). Proposals persist and expire afterMATRIMONY_PROPOSAL_TTL(default 5 min).treevsfulltree: blood relatives only vs partners included, rendered as inline text trees (FamilyView.render_tree) — Graphviz/image output is the one documented divergence.!matr incest, off by default);blood_relatedchecks ancestors, descendants, and shared ancestors (siblings/cousins).forcemarry/forcedivorce/forceadopt/forceemancipate) skip consent and relation checks but never structural rules (self, cycles, existing parent).Bot-account support
MatrimonyBot.on_message→should_process(message)returnsFalseonly for the bot's own messages; there is no blanketauthor.botexclusion, so other bots' command messages dispatch normally (bot.py). Covered by tests:on_messagedispatch for bot authors, self-message skip, and full marry/accept/adopt/divorce flows driven by bot-authored command callbacks (tests/test_dispatch.py).Layout
matrimony/family.py— Discord-free graph logic: ancestors/descendants,check_marry/check_adoptvalidation,relationshiplabels, text-tree rendering (depth/node caps, cycle-safe).matrimony/cogs/matr.py— onematrcommand group, ~36 subcommands incl. fun (hug/ship/…),block,prefix,stats; group name comes fromMATRIMONY_COMMAND_NAME, prefix is per-guild viaget_prefix(mention prefix always works).ruffclean; CI runs both on Python 3.11/3.12.Dockerfile,.env.example, and a README with the full command table, run/config docs, fidelity notes, documented divergences/limits, and upstream sources.Known limits (documented in README)
Text trees instead of image rendering; Gold/perks features not replicated; upstream is slash-command-first while this is prefix-command-based per the request.
Link to Devin session: https://app.devin.ai/sessions/c067ef84d29e404b96a5144413380a70
Open in Devin Desktop: https://app.devin.ai/desktop/session/c067ef84d29e404b96a5144413380a70?variant=devin
Requested by: @CommunityPoke