Skip to content

Discord Commands

Ali Arslan edited this page Apr 11, 2026 · 5 revisions

Discord Commands

UxmDiscordSync registers slash commands in your Discord server. There are two categories: built-in commands (provided by the plugin) and custom commands (defined by you in YAML files).

This page covers the built-in commands. For custom commands, see Custom Commands.


Built-in Slash Commands

/link

Opens a modal for players to enter their Minecraft verification code and link their account.

/link
  • Available to: All server members
  • Response: Ephemeral (only visible to the user who ran it)

Flow:

  1. User runs /link in any channel.
  2. A modal appears asking for their 6-digit code.
  3. They enter the code received from /link in Minecraft.
  4. On success: confirmation message + roles assigned.

The "Link Account" button in the linking channel does the same thing. /link is an alternative entry point.


/level

Displays a user's Discord XP and level information.

/level
/level @User
Option Description
@User Optional. View another user's level. Defaults to self.
  • Response: Ephemeral

Shows:

  • Text XP and current text level
  • Voice XP and current voice level
  • Progress to next level

Requires the Level System to be enabled.


/leaderboard

Shows the top Discord users by XP.

/leaderboard
/leaderboard text
/leaderboard voice
Option Description
text Sort by text XP (default)
voice Sort by voice XP
  • Response: Public embed (visible to everyone)

Displays the top 10 users with their levels and XP values.


/servercommand

Executes a command on the Minecraft server console.

/servercommand <command>
  • Available to: Authorized Discord users only (configured by Discord ID in config.yml)
  • Response: Ephemeral

Example:

/servercommand broadcast Hello everyone!
/servercommand give Steve diamond 64

The command runs as the server console and is executed on the main server thread.

Authorization configuration:

discord-server-command:
  enabled: true
  authorized-users:
    - "123456789012345678"   # Discord user ID
    - "987654321098765432"

/broadcast

Broadcasts a message to all online Minecraft players.

/broadcast <message>
  • Available to: Authorized Discord users only
  • Response: Ephemeral confirmation

The message supports MiniMessage formatting tags and is displayed with a configurable prefix (e.g., [Discord Broadcast]).

Authorization configuration:

discord-broadcast:
  enabled: true
  authorized-users:
    - "123456789012345678"
  prefix: "<gold>[Discord Broadcast]</gold> "

Interaction Components

Beyond slash commands, the plugin uses Discord buttons and modals in several places:

Link Account Button

Posted in the configured linking channel. Clicking it opens the code-entry modal. Persistent — the plugin reposts it if the message is deleted.

2FA Approve / Deny Buttons

Sent as a DM (or in a fallback channel) when a linked player joins the Minecraft server with 2FA enabled. Buttons are session-specific and expire when the session ends.

Button Action
✅ Approve Unfreezes the player and lets them play
❌ Deny Kicks or bans the player (as configured)

Restricting Built-in Commands

Discord commands are registered globally (or to a specific guild based on your bot setup). To restrict who can use specific commands:

  1. Go to your Discord server's Server Settings → Integrations → UxmDiscordSync (your bot).
  2. Find the command you want to restrict.
  3. Configure which roles or channels can use it.

This uses Discord's native Application Command Permission system — no plugin configuration needed for most restrictions.


Adding Your Own Commands

See Custom Commands to create custom Discord slash commands with responses, embeds, and Minecraft data lookups.

Clone this wiki locally