Skip to content

Discord Commands

Ali Arslan edited this page Apr 13, 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

/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 text
/leaderboard voice
Option Required Description
type Yes text — sort by text XP; 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 <server> <command>
Option Required Description
server Yes Server name (must match server-name in config.yml)
command Yes Command to execute (without the leading /)
  • Available to: Authorized Discord users only (configured by Discord ID in config.yml)
  • Response: Ephemeral

Example:

/servercommand survival broadcast Hello everyone!
/servercommand survival 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