Skip to content

Feature: @name in guild chat pings the Discord member - #31

Merged
zVapor-Dev merged 1 commit into
masterfrom
claude/project-thread-t91im2
Oct 21, 2026
Merged

zVapor-Dev merged 1 commit into
masterfrom
claude/project-thread-t91im2

Conversation

@zVapor-Dev

@zVapor-Dev zVapor-Dev commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Requested by zVapor · project thread

What

When a Minecraft player types @name in guild chat (or officer chat), the relayed Discord message now mentions and actually pings that member.

  • Resolution (src/utils/mentions.js): the bridge's own account link for that Minecraft name first, then the Discord REST member search (no GuildMembers intent needed) for an exact username, or a display name / server nickname that exactly one member has. Bots are never resolved. Unmatched names stay as typed. thanks @alice. works (trailing full stop retried without it).
  • Pinging: the embed description shows <@id>, and because mentions inside an embed never notify, the same ids go in the message content.
  • Abuse guard: allowedMentions: { parse: [], users: [resolved ids] }, so @everyone, @here, role mentions and raw <@id> text typed in-game ping nobody. At most five people per line.
  • Cost: lookups cached 5 min (1 min for a miss); only lines containing @ do any lookup; a failed lookup drops the ping, never the message.
  • Applied to relayToDiscord.js (guild chat) and relayOfficerToDiscord.js. Join/leave embeds unchanged. No disguise interaction: the mention is resolved from the message body, not the author.

Docs

CHANGELOG (New Features + Technical Details), DISCORD_CHANGELOG, docs/FEATURES.md (The bridge), README feature line, site/tribridge/using-the-bridge.mdx, officer-chat.mdx, architecture.mdx. No new commands, intents, permissions or config.

Verified

  • npm test: 89 pass (12 new: test/mentions.test.js plus an officer-relay payload test).
  • prettier@3.8.1 --check clean, node --check on the changed files.
  • Not verified live: no run against real Discord/Hypixel (per CLAUDE.md). The member-search behaviour is from Discord's docs (Search Guild Members has no privileged-intent requirement).

Generated by Claude Code


Generated by Claude Code

A Minecraft player typing @name in guild or officer chat now pings that
person in Discord. The name resolves through the bridge's account links
first, then the Discord member search (username, or a display name or
nickname only one member has). The embed shows the mention and the
message content carries it too, since embed mentions never notify.
allowedMentions lists only the resolved users, so @everyone, @here,
roles and raw <@id> text from guild chat ping nobody; one line pings at
most five people.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013fzxP6yCRt7dM31docwTzM
@zVapor-Dev zVapor-Dev self-assigned this Oct 21, 2026
@zVapor-Dev
zVapor-Dev marked this pull request as ready for review October 21, 2026 03:22
@zVapor-Dev
zVapor-Dev merged commit aa226ae into master Oct 21, 2026
2 checks passed
@zVapor-Dev
zVapor-Dev deleted the claude/project-thread-t91im2 branch October 21, 2026 03:22
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.

2 participants