Skip to content

Matrimony: MarriageBot-style family-tree Discord bot (with bot-account support) - #1

Merged
CommunityPoke merged 2 commits into
mainfrom
devin/1790205098-matrimony-bot
Sep 24, 2026
Merged

CommunityPoke merged 2 commits into
mainfrom
devin/1790205098-matrimony-bot

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

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)

  • Global, cross-server family trees stored in SQLite (matrimony/store.py): partners edges (unordered pairs), children edges (one parent per child, upstream's model), proposals, blocks, guild_settings.
  • Proposal flow: marry/adopt/makeparent create a proposal; the target consents via Accept/Decline buttons or accept/decline text commands (text responses also let non-UI bots answer). Proposals persist and expire after MATRIMONY_PROPOSAL_TTL (default 5 min).
  • tree vs fulltree: blood relatives only vs partners included, rendered as inline text trees (FamilyView.render_tree) — Graphviz/image output is the one documented divergence.
  • Incest is a per-guild admin toggle (!matr incest, off by default); blood_related checks ancestors, descendants, and shared ancestors (siblings/cousins).
  • Admin force commands (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) returns False only for the bot's own messages; there is no blanket author.bot exclusion, so other bots' command messages dispatch normally (bot.py). Covered by tests: on_message dispatch 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_adopt validation, relationship labels, text-tree rendering (depth/node caps, cycle-safe).
  • matrimony/cogs/matr.py — one matr command group, ~36 subcommands incl. fun (hug/ship/…), block, prefix, stats; group name comes from MATRIMONY_COMMAND_NAME, prefix is per-guild via get_prefix (mention prefix always works).
  • Tests: 37 passing (store CRUD, graph logic, validation, dispatch); ruff clean; 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

CommunityPoke and others added 2 commits September 23, 2026 23:25
- !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>
@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

@CommunityPoke
CommunityPoke merged commit 23d378f into main Sep 24, 2026
2 checks passed
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