Getting started
Text commands
Commands that run when someone mentions the bot and types a name in chat, like @Slash Commands rules.
A text command runs when someone mentions the bot, then types the command name:
@Slash Commands rulesType @, pick the bot from the list, then write the command name. If your server uses a Custom bot, mention that bot instead.
Tip
For most things, a slash command is the better choice. You can turn a text command into a slash command from the ⋮ menu on the Text Commands page.
Slash or text?#
| Slash command | Text command | |
|---|---|---|
| How to run | Type / and pick it from the menu | Mention the bot, then 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.
Make one#
The Text Commands page shows for servers that already have text commands.
- Open Text Commands and press Create.
- 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:
@Slash Commands 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:
@Slash Commands 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. @Slash Commands Rules does not run rules.