How to use the slash command builder
- Type a command name and description.
- Add options if the command takes input, such as a user to ban or a reason.
- Copy the JSON and send it to Discord's bulk overwrite endpoint, or use it in your own registration script.
Slash command rules
Command names must be 1 to 32 characters, lowercase, with no spaces (use dashes or underscores). Descriptions can be up to 100 characters. A command can have up to 25 options, and required options must come before optional ones. The tool fixes the order and the names for you.
Option types
Options can be text, whole numbers, decimals, true/false, a user, a channel, a role, a mention or a file attachment. Discord shows the correct picker for each type, so users can choose a member or channel from a list instead of typing it.
Registering your commands
Save the JSON as commands.json and run a PUT request to /applications/APP_ID/commands for global commands, or /applications/APP_ID/guilds/GUILD_ID/commands for one server while testing. Guild commands update instantly. Global commands can take a little while to appear.
Frequently asked questions
Do I need this if I use discord.py or discord.js?
Libraries create the JSON for you from your code. This tool is useful when you register commands manually, use the raw API, or want to plan commands before coding.
Why must required options come first?
Discord's API rejects commands that list an optional option before a required one. The builder reorders them automatically.
How many slash commands can a bot have?
A bot can have up to 100 global chat input commands, plus up to 100 per server.
Why don't my commands show up?
Make sure the bot was invited with the applications.commands scope and, for global commands, wait a short time. Guild commands show immediately.
More free Discord tools
Try Abyss, a bot with moderation, automod and music in one place.