> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira.lgbt/llms.txt
> Use this file to discover all available pages before exploring further.

# Arguments

> How to write arguments, flags, and values so the bot understands them.

Every command is written the same way: the command name, then its arguments, separated by spaces.

```text Syntax theme={null}
!cmd <required> [optional]
```

## Required and optional

| Notation     | Meaning                                            |
| ------------ | -------------------------------------------------- |
| `<argument>` | Required. The command won't run without it.        |
| `[argument]` | Optional. Leave it off and the bot uses a default. |

<Tip>
  The brackets are notation, not something you type. Write `!cmd hello`, not `!cmd <hello>`.
</Tip>

Optional arguments are positional, so you can drop them off the end but you can't skip
one in the middle. Given `!cmd [wow] [cool] <yeah>`, typing `!cmd apple banana` fills
`wow` and `cool`, leaving `yeah` missing. To skip `cool`, pass an empty pair of quotes:

```text Example theme={null}
!cmd apple "" banana
```

## Arguments with spaces

Arguments end at the first space. If one needs a space inside it and another argument
comes after, wrap it in double quotes.

```text Example theme={null}
!cmd apple "very cool" banana
```

Without the quotes, `very` becomes `cool` and `cool` becomes `yeah`, and everything
after that shifts out of place.

<Tip>
  The **last** argument is greedy: it takes everything remaining, spaces included.
  `!cmd apple banana this is all one argument` works fine, no quotes needed.
</Tip>

To include a literal quote mark inside a quoted argument, escape it with a backslash:
`"she said \"hi\""`.

<Warning>
  iOS and macOS autocorrect replaces straight quotes with curly ones (`"like this"`).
  The bot only recognises straight quotes, so a quoted argument that looks correct may
  still fail. Turn off **Settings > General > Keyboard > Smart Punctuation** if it keeps
  happening.
</Warning>

## Flags

Flags modify how a command runs. They can appear anywhere after the command name and
are not case sensitive.

All of these are read identically, so use whichever your keyboard gives you:

| Written as | Read as |
| ---------- | ------- |
| `-flag`    | `flag`  |
| `--flag`   | `flag`  |
| `—flag`    | `flag`  |

<Info>
  That last one matters on mobile. iOS autocorrect turns `--` into an em dash as you
  type. The bot accepts it, so there's nothing to fix and nothing to disable.
</Info>

Some flags are switches that are either on or off. Others take a value directly after
them:

```text Example theme={null}
!cmd apple -bots --user @someone
```

Flag values follow the same spacing rule as arguments. A value ends at the next space
unless you quote it:

```text Example theme={null}
!cmd apple --contains "leaked build"
```

<Tip>
  Flags that accept a value can take several at once, separated by `|` or `,`. For
  example, `--contains leaked|leaking` matches either word.
</Tip>

## Users, channels, and roles

Anywhere a command asks for a user, channel, or role, you can pass any of these:

| Form         | Example                |
| ------------ | ---------------------- |
| Mention      | `@someone`, `#general` |
| ID           | `123456789012345678`   |
| Exact name   | `someone`, `general`   |
| Partial name | `some`, `gen`          |

<Info>
  Partial names match the first result found. If a server has several similar names,
  use a mention or an ID to be certain you're targeting the right one.
</Info>
