Discord slash command generator

Build a Discord slash command: set the name, options and types, preview it and copy the JSON to register it with the API. Free, in your browser.

Scope

Options 1 / 25

Preview in Discord

/ban user Bans a user from the server for good
  • Where to send it POST /applications/{application.id}/guilds/{guild.id}/commands

Request body

{
  "name": "ban",
  "description": "Bans a user from the server for good",
  "type": 1,
  "options": [
    {
      "name": "user",
      "description": "Who to ban",
      "type": 6,
      "required": true
    }
  ]
}

How to use it in three steps

Step by step, with this page's example.

  1. 01

    Give the command a name and description.

  2. 02

    Add options with types and requirements.

  3. 03

    Copy the JSON and register the command with the API.

What you enter

Name "Ticket", an optional option details and a required option topic, both text

What you get
{
  "name": "ticket",
  "description": "Open a ticket",
  "type": 1,
  "options": [
    {
      "name": "topic",
      "description": "What it is about",
      "type": 3,
      "required": true
    },
    {
      "name": "details",
      "description": "More about the ticket",
      "type": 3,
      "required": false
    }
  ]
}

Questions

What is a Discord slash command?
It is a command starting with / that a bot registers with the Discord API along with a description and options, so Discord suggests it to users.
How do I register a slash command with the Discord API?
Send the JSON from the tool with a POST request to the application commands endpoint: /applications/{application.id}/commands for a global command or /applications/{application.id}/guilds/{guild.id}/commands for one server.
What does type 3 mean?
It is the STRING option type. Discord numbers types: 3 is text, 4 an integer, 6 a user, 7 a channel, 8 a role.
How is a global command different from a server command?
A command registered for one server is available right away; a global one works on every server with the bot and needs a moment for Discord to propagate it.
How many slash commands can a bot have?
Up to 100 global slash commands per application, plus up to 100 commands for each server.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.