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

# Custom instances

> Run mira under your own bot account, with your own name and avatar.

A custom instance is mira running under **your** bot application. Same commands, same features — different name, avatar, and presence. Members see your bot in the member list, and it's your token, so you own the application.

## Setting it up

<Steps>
  <Step title="Create a Discord application">
    Go to the [Discord Developer Portal](https://discord.com/developers/applications), create an application, add a bot user, and copy the token.

    Turn on all three **privileged gateway intents** — Presence, Server Members and Message Content. Without them, most of the bot won't work.
  </Step>

  <Step title="Submit the token">
    ```javascript theme={null}
    !instance set
    ```

    Opens a private form. **The token is never typed in chat**, so it can't leak in a screenshot or be sniped from message history.

    <Warning>
      **Your bot will leave every server you don't own or administrate.** A custom instance is only permitted in servers where its owner is the server owner or has Administrator, and it enforces that the moment it connects.

      This is permanent — it won't rejoin, and anyone who wants it back has to re-invite it. If your bot is already in servers you'd rather it stayed in, **don't submit that token**; make a fresh application instead.

      The setup prompt asks you to confirm this before the token form opens, and there's a Cancel button if you'd rather not.
    </Warning>
  </Step>

  <Step title="Invite it">
    ```javascript theme={null}
    !instance invite
    ```

    Generates an invite link scoped to your server.
  </Step>
</Steps>

Aliases for the group: `cb`, `custombot`.

<Warning>
  Regenerate the token in the Developer Portal the moment you suspect it's been exposed, then run `!instance set` again with the new one. A leaked bot token gives anyone full control of the bot account.
</Warning>

## Customising it

<CodeGroup>
  ```javascript Username (global) theme={null}
  !instance customize username G.O.A.T.
  ```

  ```javascript Avatar theme={null}
  !instance customize avatar (attach an image)
  ```

  ```javascript Banner theme={null}
  !instance customize banner (attach an image)
  ```

  ```javascript Bio theme={null}
  !instance customize bio Best bot ever made
  ```

  ```javascript Presence theme={null}
  !instance status watching over the server
  ```

  ```javascript Reset everything theme={null}
  !instance customize reset
  ```
</CodeGroup>

Username changes are **global** — the bot is renamed everywhere it's in. Avatar, banner and bio can be set per server, so one instance can look different in each.

`!instance clear` removes the presence. `!instance info` shows the current configuration.

## Startup

Connecting happens in two stages, and the setup message shows both:

1. **Connecting** — the gateway handshake. If this fails, the token is genuinely bad or the application has no bot user.
2. **Leaving servers you don't administrate** — the access sweep.

If your bot was already in a lot of servers, the second stage takes a while — Discord rate-limits how fast a bot can leave. The instance is **already online and usable** during this; the setup message reports success and tells you how many servers it left, with the rest finishing in the background.

<Note>
  The sweep also re-runs every 15 minutes. If you lose Administrator in a server, the instance leaves it on the next pass rather than lingering.
</Note>

## Removing it

```javascript theme={null}
!instance remove
```

Stops the client and removes the configuration. Your Discord application still exists — delete it in the Developer Portal if you're done with it.

Aliases: `disable`, `delete`.

## Instance vs. customize vs. reskin

Three ways to change how the bot looks, at different levels:

|                                                                              | Scope                  | Changes                                                     |
| ---------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------- |
| [`customize`](/getting-started/finding-commands#making-responses-look-right) | One server             | mira's nickname, avatar, banner, bio, response colours      |
| [`reskin`](/getting-started/finding-commands#making-responses-look-right)    | Per user, per channel  | Responses sent through a webhook as *you*                   |
| `instance`                                                                   | A separate bot account | Everything — name, avatar, presence, the application itself |

`customize` is free and instant. `instance` is a real, separate bot that appears in the member list under its own name.

<Note>
  A custom instance runs the same code as the main bot, so it gets every feature and every update automatically. Your server's configuration — prefixes, welcome messages, tickets, everything — is shared between them.
</Note>

## Command reference

| Command                                  | Aliases                | Description            |
| ---------------------------------------- | ---------------------- | ---------------------- |
| `instance set`                           | `token`, `connect`     | Submit your bot token  |
| `instance invite`                        | `link`                 | Get an invite link     |
| `instance info`                          | `show`, `view`         | View the configuration |
| `instance status <text>`                 | `activity`, `presence` | Set the presence       |
| `instance clear`                         | —                      | Remove the presence    |
| `instance customize username <name>`     | `name`, `rename`       | Change the username    |
| `instance customize avatar [attachment]` | `pfp`, `av`            | Change the avatar      |
| `instance customize banner [attachment]` | —                      | Change the banner      |
| `instance customize bio <bio>`           | `about`                | Change the bio         |
| `instance customize reset`               | `clear`, `default`     | Reset the profile      |
| `instance remove`                        | `disable`, `delete`    | Stop the instance      |
