Slash commands vs prefix commands (honestly)

The !command style and the /command style aren't just taste — one of them depends on a privileged intent that caps how far your bot can grow. Here's the honest comparison and why new bots should start with slash commands.

There are two ways a Discord bot takes commands: slash commands (/ban), registered with Discord and typed with a /, and prefix commands (!ban), where the bot reads every message and checks whether it starts with your prefix. People argue about which is nicer — but the real deciding factor isn't style. It's one Discord policy that quietly caps how far a prefix bot can grow.

At a glance
You need to have built a first bot or be about to
Plan any
Time about ten minutes

The two styles

Slash commands are declared to Discord. You register a command's name, description, and typed options; Discord draws the UI, validates input, shows autocomplete, and hands your bot a clean interaction. The user never sees your bot read a message — because it doesn't.

Prefix commands work the old way: the bot receives every message in a channel, checks if it starts with !, and parses the rest of the text itself. Simple to picture, and for years it was the only option.

The catch that decides it

To read the text of messages that aren't directed at your bot, your bot needs the Message Content intent — and that intent is privileged. Two consequences follow:

  1. You must switch it on in the Developer Portal, or the gateway refuses your login (discord.js reports Used disallowed intents; discord.py raises PrivilegedIntentsRequired).
  2. Discord gates it at scale. Once a bot is in 100+ servers it must be verified, and Discord only grants privileged intents like Message Content to verified bots that can justify the need. A prefix bot that reads all messages is depending on exactly that intent.

Slash commands need none of this. A slash-command bot reads no message content, so it never touches the privileged intent and never hits that ceiling. That's the honest heart of the matter: prefix commands have a growth ceiling built into Discord's policy; slash commands don't.

🎯 Good to know: This is why the first-bot guide uses only GatewayIntentBits.Guilds — a slash bot genuinely needs nothing more, and stays free of the verification headache.

Side by side

Slash commands Prefix commands
How the user runs it type /, pick from a menu type !name as a message
Discoverability Discord lists them with descriptions users must already know them
Input handling typed options, validated by Discord you parse the string yourself
Message Content intent not needed required (privileged)
Grows past 100 servers yes needs verification + intent approval
Works in DMs / mobile first-class clumsy
Editing a command change the definition, restart change your parser

When prefix commands still make sense

They're not wrong — they're niche now:

  • A small private bot in a handful of servers you own, where verification will never come up.
  • A bot that genuinely must read arbitrary message text — an auto-moderator scanning for banned words, a chat-logger. That's the real, legitimate use of Message Content, and you enable the intent knowing the growth trade-off.
  • Quick internal tooling where you value a two-line message handler over registering commands.

Even then, check whether a context menu command (right-click a message or user) covers what you wanted — it often does, with no privileged intent.

The recommendation

Build new bots on slash commands. They're the modern default, they scale without a verification wall, and Discord clearly points that way. Start with Host a discord.js bot and grow with Slash commands in depth.

If you do need message content, enable the intent in the Developer Portal, add GatewayIntentBits.MessageContent alongside GuildMessages, and go in eyes-open about the growth ceiling.

Troubleshooting

  • Prefix bot ignores all messages — the Message Content intent is off, or missing from your Client. Turn it on in the Developer Portal and request it in code, or switch to slash commands.
  • Used disallowed intents on startup — you requested a privileged intent that isn't enabled. Enable it in the portal, or remove it if you don't need it. See Bot appears offline.
  • Slash commands don't appear — first-time global registration lags a few minutes; re-invite with the applications.commands scope if they never show. See the discord.js guide.
  • Can't get Message Content approved — you're at or near 100 servers unverified. That's the ceiling; see Growing your bot.

Next steps

Was this guide helpful?