# 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.

```text
..rules
```

The 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

1. Open **Create → Text Command**.
2. Set **Command Name**, for example `rules`.
3. Write the reply in **Response**.
4. 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:

```text
..give @Alex 50
```

With 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`, `true` or `1` as true.

Each argument is a variable with its name, the same as in slash commands:

```text
{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`.

```python
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](https://ccbot.app/docs/getting-started/how-commands-run).

> **Note:** The command name must match exactly. `..Rules` does not run `rules`.
