Options
Register-ready JSON
{
"name": "ping",
"type": 1,
"description": "Replies with pong"
}How to use it
Set a lowercase name (1–32) and a description (1–100). Add options and types. Copy the JSON and register it with Discord’s REST API or your library’s command registrar.
FAQ
What JSON does Discord expect for a slash command?+
A body with name, description, type (1 for CHAT_INPUT), and optional options[]. Each option has type, name, description, and optional required/choices. That is what this builder copies.
What are the Discord slash command option types?+
1 subcommand, 2 subcommand group, 3 string, 4 integer, 5 boolean, 6 user, 7 channel, 8 role, 9 mentionable, 10 number, 11 attachment.
Do slash command names have to be lowercase?+
Yes for CHAT_INPUT (type 1). Use 1–32 letters, numbers, underscores, or hyphens. User and message context menus (types 2 and 3) can use mixed case and spaces.
How do I register this JSON?+
PUT /applications/{app.id}/commands (global) or /applications/{app.id}/guilds/{guild.id}/commands. discord.js: rest.put(Routes.applicationCommands(clientId), { body: [json] }).
Related tools
Build a Discord bot visually on Kitcord
Tired of hand-writing command JSON? Kitcord’s canvas registers slash commands from visual flows.
Kitcord is not affiliated with, endorsed by, or sponsored by Discord Inc. Discord is a trademark of Discord Inc.