How to make custom slash commands in Discord

A custom slash command is a command your own bot adds to Discord, such as /rules or /give. Discord shows it in the command list with its description and options. In Buildcord each command is a flow: the command starts it and the steps after it decide what the bot does. Commands run free.

6 stepsNo codeUpdated

Steps

  1. Add a slash command flow

    In your bot, add a flow and choose Slash command. Give it a name, such as rules, and a description. Discord shows the description next to the command.

  2. Give it options

    Add an option for each input the command asks for. An option can be text, a whole number, a number, true or false, a member, a channel or a role, and can be required. Use it in later steps as {option.name}.

  3. Offer fixed choices

    For a text option, add a list of choices and members can pick only those values. This is how a /color command offers red, green and blue.

  4. Group commands as subcommands

    A name can be up to three words, such as ticket panel. Later words make a subcommand, registered under the first word, so related commands sit together.

  5. Decide what it does

    Connect steps after the command: a Reply or an embed, a role given or removed, a row saved to a collection, an API request. The checker flags anything that can't run.

  6. Deploy

    Press Deploy. Buildcord registers your commands with Discord every time you deploy. To try them first, sync them to one test server.

Good to know

  • Slash commands don't need the bot to stay connected, so they run on the Free plan.
  • Two commands can't share a name, and every command needs a flow.
  • Checks such as Permissions can keep a command to moderators.
  • Describe the command to the AI agent and it can draw the flow for you.

Questions

How many slash commands can a bot have?

Discord sets the limit: up to 100 top-level slash commands per bot, each with its own subcommands. Buildcord registers all of a bot's commands each time it deploys.

Why doesn't my new command show up in Discord?

Commands are registered when you deploy, so deploy after adding one. If it still doesn't appear, restart Discord or check that the bot was invited to the server with its invite link.

More guides

Draw the first flow.

A command, a reply and a deploy is a working bot. It takes a few minutes.

Start buildingOpen dashboard