xgaming.tools

Discord Bot Slash Command Builder

Build Discord application commands visually — slash, user-context, message-context. All 11 option types (string, integer, user, channel, role, attachment, mentionable, etc.) with choices, autocomplete, min/max, channel filters. Copy the JSON + a curl snippet to register it.

Command

max 32
max 100

Permission integer. Use the Permissions Calculator on this site to build one. Server admins can still override per-command via Integrations settings.

Options (3/25)

No choices — the option accepts any value the user types.

How users see it

/warn
Warn a member — logs an audit note and DMs them the reason
user * (user) — Member to warn
reason * (string) — Why are you warning them?
silent (boolean) — Skip the DM to the member
command JSON
{
  "type": 1,
  "name": "warn",
  "description": "Warn a member — logs an audit note and DMs them the reason",
  "dm_permission": false,
  "nsfw": false,
  "options": [
    {
      "type": 6,
      "name": "user",
      "description": "Member to warn",
      "required": true
    },
    {
      "type": 3,
      "name": "reason",
      "description": "Why are you warning them?",
      "required": true,
      "min_length": 3,
      "max_length": 400
    },
    {
      "type": 5,
      "name": "silent",
      "description": "Skip the DM to the member",
      "required": false
    }
  ]
}
register via curl
# Register globally (takes up to 1 hour to propagate)
curl -X POST \
  -H "Authorization: Bot $DISCORD_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": 1,
  "name": "warn",
  "description": "Warn a member — logs an audit note and DMs them the reason",
  "dm_permission": false,
  "nsfw": false,
  "options": [
    {
      "type": 6,
      "name": "user",
      "description": "Member to warn",
      "required": true
    },
    {
      "type": 3,
      "name": "reason",
      "description": "Why are you warning them?",
      "required": true,
      "min_length": 3,
      "max_length": 400
    },
    {
      "type": 5,
      "name": "silent",
      "description": "Skip the DM to the member",
      "required": false
    }
  ]
}' \
  https://discord.com/api/v10/applications/$APPLICATION_ID/commands

# Or register to a single guild (instant, good for dev)
curl -X POST \
  -H "Authorization: Bot $DISCORD_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": 1,
  "name": "warn",
  "description": "Warn a member — logs an audit note and DMs them the reason",
  "dm_permission": false,
  "nsfw": false,
  "options": [
    {
      "type": 6,
      "name": "user",
      "description": "Member to warn",
      "required": true
    },
    {
      "type": 3,
      "name": "reason",
      "description": "Why are you warning them?",
      "required": true,
      "min_length": 3,
      "max_length": 400
    },
    {
      "type": 5,
      "name": "silent",
      "description": "Skip the DM to the member",
      "required": false
    }
  ]
}' \
  https://discord.com/api/v10/applications/$APPLICATION_ID/guilds/$GUILD_ID/commands

Every option Discord application commands support, in one builder

Discord's application command API (slash commands, user right-click, message right-click) takes a precise JSON structure. Get the option types wrong or miss a constraint and registration fails with 50035. The official docs cover every field but don't show how they fit together in a real payload — this builder does. Pick command type (CHAT_INPUT / USER / MESSAGE), add up to 25 options of any type, set min/max/length constraints, pre-set choices, enable autocomplete, filter channel options to specific channel types.

All 11 option types supported: STRING (with min_length, max_length, choices, autocomplete), INTEGER + NUMBER (min_value, max_value, choices, autocomplete), BOOLEAN, USER, CHANNEL (with channel_types filter), ROLE, MENTIONABLE, ATTACHMENT, plus SUB_COMMAND and SUB_COMMAND_GROUP for nested commands. default_member_permissions lets you hide the command from non-admins by default (use the Permissions Calculator on this site to build the integer).

Side panel shows both a Discord-style preview of what your users see in the command picker AND the raw JSON. Switch to the curl tab and you get a ready-to-paste registration snippet — one for global commands (POST /applications/{app_id}/commands, propagates in ~1 hour) and one for guild-scoped commands (POST /applications/{app_id}/guilds/{guild_id}/commands, instant — the best way to iterate during development).

Naming rules are validated live: command + option names must be 1-32 lowercase letters, digits, hyphens, or underscores. Descriptions max 100 chars for CHAT_INPUT commands; USER/MESSAGE context commands have no description (they're triggered via right-click). Subcommands nest up to 2 levels deep (COMMAND → SUB_COMMAND_GROUP → SUB_COMMAND → options). Everything that Discord validates, this builder validates first.

Discord Bot Slash Command Builder — FAQ

How long do global slash commands take to appear?

Globally-registered commands can take up to 1 hour to propagate across Discord's servers. For development, register to a specific guild instead — guild commands appear instantly. Switch to global once the command is finalized.

What's the difference between slash, user, and message commands?

CHAT_INPUT (type 1) = /name command with options, triggered by typing. USER (type 2) = right-click a user → Apps menu → your command (no options, has no description). MESSAGE (type 3) = right-click a message → Apps menu → your command. Context commands pair well with moderation bots (right-click → Report this user).

How do I handle autocomplete in my bot?

Set autocomplete: true on a string/integer/number option. Discord sends your bot an APPLICATION_COMMAND_AUTOCOMPLETE interaction as the user types — respond within 3 seconds with up to 25 choice objects. Your bot dynamically generates suggestions (e.g. matching player names from your DB).

What's default_member_permissions vs channel permission overwrites?

default_member_permissions hides the command from users without those permissions (e.g. set 8/Administrator to hide from regular members). Server admins can override per-command via Server Settings → Integrations → Your Bot. Channel overwrites are not checked by this field — they apply separately when the command runs.

Can I nest subcommands?

Yes — max 2 levels deep. Top-level command → sub_command_group → sub_command → options. Example: /mod user ban, /mod user kick, /mod role add. Each leaf sub_command can have its own options. sub_command_groups can't hold options directly, only more sub_commands.

You might also need

Built-In Tool

Config Tool Built Into XGamingServer

Get managed Discord Bot hosting with this tool in your panel — configure, deploy, and play in minutes. No file uploads needed.

Built-In Config ToolInstant Server SetupDDoS ProtectionExpert 24/7 Support
Get 40% OFFNo setup fees · Cancel anytime