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

# Prefixes

> Server prefixes, personal prefixes, and the ways to run a command without one.

The default prefix is **`!`**. Mentioning the bot always works as a prefix too, no matter what else is configured — `@mira ping` will run even if you've forgotten what you changed the prefix to.

## Server prefixes

`prefix` · aliases `prefixes` · requires **Manage Server** to change

<CodeGroup>
  ```javascript View current theme={null}
  !prefix
  ```

  ```javascript Replace it theme={null}
  !prefix set ;
  ```

  ```javascript Keep several theme={null}
  !prefix add .
  !prefix add ,
  ```

  ```javascript Remove one theme={null}
  !prefix remove ,
  ```

  ```javascript Back to default theme={null}
  !prefix reset
  ```
</CodeGroup>

A server can have multiple prefixes at once. When several are configured, the **longest matching one wins** — so if you have both `.` and `..` set, typing `..ping` runs `ping`, not `.ping` with a leading dot.

<Info>
  Prefixes are matched exactly, including spaces. `!prefix set "mira "` gives you `mira ping`. Quotes are needed for anything with a space in it.
</Info>

## Your own personal prefix

This is the one people miss. A personal prefix follows **you** into every server mira is in, regardless of what that server's prefix is set to.

<CodeGroup>
  ```javascript Set it theme={null}
  !prefix self ;
  ```

  ```javascript Check it theme={null}
  !prefix self
  ```

  ```javascript Remove it theme={null}
  !prefix self remove
  ```
</CodeGroup>

`selfprefix` works as a shortcut for the same thing.

Your personal prefix is *added* to the server's prefixes rather than replacing them, so other people in the server are unaffected — they keep using whatever the server has configured, and you use yours.

<Warning>
  Pick something unlikely to collide with other bots. A personal prefix of `.` in a server where another bot also uses `.` means both bots will try to respond to `.ban`.
</Warning>

## Running commands without a prefix

<AccordionGroup>
  <Accordion title="Slash commands" icon="slash">
    A subset of commands are also registered as slash commands — mostly the ones people use constantly, like `/nowplaying` and `/timezone`. Type `/` and the picker will show what's available. Slash commands ignore prefixes entirely.
  </Accordion>

  <Accordion title="Mentioning the bot" icon="at">
    `@mira help` always works. Useful when you've joined a server and don't know its prefix, or when you've locked yourself out by setting a prefix you can't type on mobile.
  </Accordion>

  <Accordion title="Shortcuts" icon="wand-magic-sparkles">
    A [shortcut](/setup/triggers#command-shortcuts) is a server-specific alias that maps a word to a full command, including its arguments:

    ```javascript theme={null}
    !shortcut add mod role {0} @Moderator
    ```

    Now `!mod @someone` assigns the Moderator role. Requires **Manage Server**.
  </Accordion>

  <Accordion title="The link autoplayer and reposter" icon="link">
    With `!play links on`, dropping a Spotify or YouTube link in a channel queues it without a command. With the [reposter](/social/reposter) enabled, pasting a TikTok or Instagram link re-uploads the media automatically. Both are opt-in.
  </Accordion>
</AccordionGroup>

## Restricting where commands work

If you want commands confined to a bot channel:

<CodeGroup>
  ```javascript Only allow commands here theme={null}
  !commandonly add #bot-commands
  ```

  ```javascript Only mira's commands theme={null}
  !commandonly mira #bot-commands on
  ```

  ```javascript Only slash commands theme={null}
  !commandonly slash #bot-commands on
  ```

  ```javascript Allow another bot's prefix too theme={null}
  !commandonly prefix add #bot-commands -
  ```
</CodeGroup>

In a command-only channel, anything that isn't a command gets deleted. By default mira recognises the common prefixes other bots use and leaves those messages alone; `commandonly prefix add` lets you allow an unusual one, and `commandonly prefix clear` goes back to allowing all of them.

The inverse — blocking commands in a channel rather than requiring them — is covered in [Command access](/security/command-access).

## Command reference

| Command                  | Aliases                         | Permission    | Description                   |
| ------------------------ | ------------------------------- | ------------- | ----------------------------- |
| `prefix`                 | `prefixes`                      | —             | View the server's prefixes    |
| `prefix set <prefix>`    | —                               | Manage Server | Replace all prefixes with one |
| `prefix add <prefix>`    | `create`, `new`                 | Manage Server | Add an additional prefix      |
| `prefix remove <prefix>` | `delete`, `del`, `rm`           | Manage Server | Remove one prefix             |
| `prefix reset`           | —                               | Manage Server | Restore the default           |
| `prefix self [prefix]`   | `me`, `my`, `personal`, `own`   | —             | Set your personal prefix      |
| `prefix self remove`     | `reset`, `clear`, `off`, `none` | —             | Remove your personal prefix   |
