Prefix Command on Discord: What It Is and Why It Fades
A prefix command is a bot command typed as an ordinary message that begins with a short symbol such as ! or $, for example $help. The bot reads every message to spot the prefix, which is why prefix commands need the privileged message content intent.
How prefix commands work
Before slash commands existed, this was the only way. A bot watched each message in the channels it could see. If the text started with its prefix, it split the rest into a command name and arguments and ran the command. The prefix is just a convention the bot picks, so every bot has its own.
Two bots with the same prefix in one server will both answer, which is a common source of double replies.
Limits compared with slash commands
- No menu or autocomplete, so members must remember the exact name.
- The bot must read all message text. Since 2022 that needs the message content privileged intent.
- No built-in permission control through Discord's Integrations screen, so each bot checks permissions itself.
- Typos are only caught by the bot, not by Discord.
Still, many members find a short typed command quicker, especially for music bots, and some bots keep both. Read the prefix versus slash article for a fuller view.
Prefixes in Noxyr
Noxyr runs every command both ways. A message that starts with the server prefix is turned into the same request a slash command would make and runs the same code, so permissions and behavior match. The default prefix is $. Subcommands follow the name ($music settings), options use name:value, and unnamed words fill the required options in order, so $play never gonna give you up works.
/prefix viewshows the current prefix./prefix setchanges it to 1 to 5 characters with no spaces, such as!,?orn!./prefix resetreturns to$.
You can also set it from the dashboard on the Setup or Custom Commands page. Forms that open a pop-up only work from the slash menu. Details are in the prefix docs, and the guide on changing a bot prefix walks through it.
Picking a prefix
Choose something no other bot in the server uses. Two characters like n! rarely clash. If you also want a different command name, use custom commands.
Quick tips
Keep the prefix short and unlikely to appear at the start of normal chat. Tell members about it in your rules or welcome message, and pin a short command list for the ones they use daily.
Common questions
What is the default Noxyr prefix?
The default is $. Change it with /prefix set, from 1 to 5 characters.
Do prefix commands need special permissions?
The bot needs the message content intent to read them. Noxyr applies the same permission checks as the slash version.
Why do two bots answer the same command?
They share a prefix. Give each bot a different one to stop double replies.