Getting started
Text commands
Commands that run when someone types a prefix and a name in chat, like ..rules.
A text command runs when someone types a message that starts with your prefix and the command name.
..rulesThe default prefix is .. (two dots). Change it on the Settings page under Command prefix. It can be 1 to 10 characters.
Slash or text?#
| Slash command | Text command | |
|---|---|---|
| How to run | Type / and pick it from the menu | Type the prefix and the name |
| Shows in Discord's command menu | Yes | No |
| Arguments | Discord shows a box for each one | Typed after the name, split by spaces |
| Reply only the user can see | Yes | No |
| Buttons, embeds, code | Yes | Yes |
Pick slash for most commands. People can find them in the menu, and Discord checks the arguments for you.
Pick text for quick shortcuts, or when you want commands that do not show in the menu.
Make one#
- Open Create → Text Command.
- Set Command Name, for example
rules. - Write the reply in Response.
- Press Save.
Text commands do not need a sync. They work as soon as you save.
Arguments#
Arguments are typed after the name, split by spaces:
..give @Alex 50With two arguments, a Member named target and an Integer named amount, the bot reads @Alex as target and 50 as amount.
Rules for typing arguments:
- Spaces split arguments. Wrap text in double quotes to keep spaces:
..say "hello there". - The last argument takes the rest. If there are more words than arguments, the extra words go into the last one. Good for a reason or a message.
- Members, roles and channels are typed as mentions:
@Alex,@Mods,#general. - Boolean arguments accept
yes,trueor1as true.
Each argument is a variable with its name, the same as in slash commands:
{user.mention} gave {amount} coins to {target.mention}.In code#
Text commands have a message variable. It is the message that ran the command. There is no interaction.
add_reactions(message, "✅")Everything else works the same as a slash command: pre-hook, Response, post-hook, buttons and embeds. See How a command runs.
Note
The command name must match exactly. ..Rules does not run rules.