11/13/2026
Slash commands or prefix commands? How to choose for your Discord bot
Slash commands like /ban and prefix commands like !ban both still work, but they behave very differently: permissions, intents, discoverability, options and speed. A practical comparison and when to offer both.
Discord bots used to be controlled only by typing a symbol and a word:
Prefix commands are ordinary messages. The bot reads every message in the channels it can see, checks whether it starts with its prefix (say
Slash commands are registered with Discord ahead of time. Discord shows them in the
| | Slash commands | Prefix commands |
| --- | --- | --- |
| Discoverability | Listed in the
| Options | Typed fields: user picker, numbers, choices, files | Free text the bot has to parse |
| Message Content intent | Not needed | Required (privileged) |
| Permissions | Can be hidden from members without a permission | The bot has to check permissions itself |
| Private replies | Can answer only to the person ("ephemeral") | Replies are visible to everyone |
| Response time | Must answer or defer within 3 seconds | No hard deadline |
| Chat noise | No visible command message | Each command leaves a message in the channel |
| Mobile | Pickers and autocomplete | Typing exact syntax |
For most bots slash commands win: members discover them, the options are validated before the bot even sees them, moderation commands can be hidden from regular members, and the bot does not need the Message Content intent, which large bots must apply for.
If you use prefix commands, keep the prefix to one or two unusual characters (
Many servers do best with both: slash commands for everyone and prefix shortcuts for staff. A well-built bot defines the command once and lets it answer both ways, so the behaviour cannot drift apart.
In Bottly each command's trigger block has a choice of Slash + prefix, Slash only or Prefix only, and an optional own prefix for that command. Prefix-only commands are not registered in the
Whichever style you choose, good names matter more than the symbol:
Choose slash commands by default, add prefixes where your community really uses them, and your bot will be easy to learn for newcomers and fast for regulars.
!help, ?ban @user, .play song. Then Discord added slash commands: type / and a menu shows every command with its options. Both kinds still work today, and many bots support both. Which one should your bot use?How each one works
Prefix commands are ordinary messages. The bot reads every message in the channels it can see, checks whether it starts with its prefix (say
!), splits the rest into a command name and arguments, and acts on it.Slash commands are registered with Discord ahead of time. Discord shows them in the
/ menu, checks the options the member fills in (a user, a number, a choice from a list), and sends the bot a ready-made interaction. The member's message never appears in the chat.The practical differences
| | Slash commands | Prefix commands |
| --- | --- | --- |
| Discoverability | Listed in the
/ menu with descriptions | Members must know them or read !help || Options | Typed fields: user picker, numbers, choices, files | Free text the bot has to parse |
| Message Content intent | Not needed | Required (privileged) |
| Permissions | Can be hidden from members without a permission | The bot has to check permissions itself |
| Private replies | Can answer only to the person ("ephemeral") | Replies are visible to everyone |
| Response time | Must answer or defer within 3 seconds | No hard deadline |
| Chat noise | No visible command message | Each command leaves a message in the channel |
| Mobile | Pickers and autocomplete | Typing exact syntax |
For most bots slash commands win: members discover them, the options are validated before the bot even sees them, moderation commands can be hidden from regular members, and the bot does not need the Message Content intent, which large bots must apply for.
When prefix commands still make sense
Speed for regulars. Moderators who type
!w @user spam fifty times a day find it faster than opening a form.Habits. Communities that grew up with a prefix bot expect
!rank and !help.Free text commands. Things like
!say or quick replies where the "options" are simply the rest of the message.Keyword triggers. Auto-replies to words, link filters and similar features read message content anyway.
If you use prefix commands, keep the prefix to one or two unusual characters (
!, ?, ., or something like s!) so normal chat does not trigger them by accident, and always enable the Message Content intent in the Developer Portal. Without it the bot sees empty messages and prefix commands silently do nothing.Offering both
Many servers do best with both: slash commands for everyone and prefix shortcuts for staff. A well-built bot defines the command once and lets it answer both ways, so the behaviour cannot drift apart.
In Bottly each command's trigger block has a choice of Slash + prefix, Slash only or Prefix only, and an optional own prefix for that command. Prefix-only commands are not registered in the
/ menu, so you can keep staff shortcuts out of members' sight, while slash-only commands never answer a typed prefix.Naming commands well
Whichever style you choose, good names matter more than the symbol:
Short, lowercase, one word where possible:
/ticket, /shop, /rank. Slash command names must be lowercase and at most 32 characters.Group related actions:
/giveaway start, /giveaway end instead of /startgiveaway.Describe every command and option. The description is what members see in the menu; "Ban a member and delete their last day of messages" beats "ban command".
Use choices instead of free text when there is a fixed list (for example durations or categories). Members make fewer mistakes, and your flow needs fewer checks.
Checklist before you publish
Every command has a clear description.
Moderation commands are limited to the right permissions.
Long actions defer so they do not hit the 3-second limit.
If you use prefixes, the Message Content intent is on.
You tested as a normal member, not as the server owner.
Choose slash commands by default, add prefixes where your community really uses them, and your bot will be easy to learn for newcomers and fast for regulars.