Skip to content

feat(discord_bot): add /set_primary command - #186

Merged
extreme4all merged 2 commits into
developfrom
feat/set-primary-rsn
Aug 29, 2026
Merged

feat(discord_bot): add /set_primary command#186
extreme4all merged 2 commits into
developfrom
feat/set-primary-rsn

Conversation

@extreme4all

Copy link
Copy Markdown
Contributor

Summary

  • Adds a /set_primary <RSN> hybrid command to the rsn linking cog, letting users choose which of their linked accounts is their primary RSN
  • Validates the RSN format, player existence, and that the account is linked (verified) to the caller's Discord ID before updating; rejects the request if the account is already primary
  • Reuses the existing DiscordVerificationRepo.set_primary_rsn, which clears the previous primary and sets the new one
  • Adds tests covering success, invalid RSN, missing player, not-linked, already-primary, and update-failure paths

Dependency flow

base (discord_bot) -> component (database/discord) — no boundary changes

Testing

  • uv run pytest — 140 passed
  • uv run ruff check / uv run ruff format --check — clean

extreme4all added 2 commits August 29, 2026 13:05
Allows users to set a primary RSN among their linked, verified
accounts. Validates that the target account is linked to the
caller's Discord ID and is not already primary.
@extreme4all
extreme4all merged commit ea4eb9f into develop Aug 29, 2026
7 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