Skip to content

Add /discord link and /discord unlink commands - #18

Open
liwd190019 wants to merge 1 commit into
peacefulcraft-network:masterfrom
liwd190019:codex/discord-link-unlink
Open

Add /discord link and /discord unlink commands#18
liwd190019 wants to merge 1 commit into
peacefulcraft-network:masterfrom
liwd190019:codex/discord-link-unlink

Conversation

@liwd190019

Copy link
Copy Markdown

Summary

Implements the first slice of account-linking support from Issue #17 by adding a new /discord command with link and unlink subcommands.

Changes

  • Adds /discord link:
    • Requires in-game player sender
    • Requires DB pool configured/available
    • Rejects if player already linked
    • Generates a short link code via existing JDBC helpers and instructs the player to DM it to the bot
  • Adds /discord unlink:
    • Requires DB pool configured/available
    • Rejects if player not linked
    • Unlinks via existing JDBC helpers
  • Registers the new command in the plugin entrypoint

Files

  • src/net/peacefulcraft/cowbot/commands/DiscordCommand.java
  • src/net/peacefulcraft/cowbot/CowBot.java

Notes / Follow-ups

  • This PR does not yet implement the Discord DM flow to consume the code and finalize linking, or the configurable role grant; intended as a small, reviewable first step toward Issue Discord <-> Minecraft account linking #17.

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