px p4: fenrir /link /unlink /linked (atomic code claim, bifrost.players.discord_id string, optional Verified role) - #49
Draft
alppp wants to merge 2 commits into
Draft
px p4: fenrir /link /unlink /linked (atomic code claim, bifrost.players.discord_id string, optional Verified role)#49alppp wants to merge 2 commits into
alppp wants to merge 2 commits into
Conversation
…a string, Verified role optional)
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.
Companion to Bifrost PR valhallamcio/Bifrost#80 (PX wave P4), stacked on #48. Not deployed.
/link code:(any member, guild-only) claims abifrost.discord_link_codesdoc with ONE findOneAndUpdate, writesbifrost.players{discord_id: <string snowflake>, discord_name, discord_linked_at}guarded bydiscord_id:{$in:[null]}, audits, optionally adds the Verified role (discordLink.verifiedRoleId; REST fetch — no GuildMembers intent; bot needs Manage Roles above the role);/unlink [player](own accounts; ManageGuild may unlink anyone; role removed when none remain);/linked. One Discord ↔ many MC, one MC ↔ one Discord. Index names/options identical to Bifrost's. Tests 106 → 128.config/is gitignored: key documented in README + initializer template (false= off).