> For the complete documentation index, see [llms.txt](https://docs.clashperk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clashperk.com/features/nickname.md).

# Nickname

Automatically format Discord nicknames using in-game data.

ClashPerk can automatically set Discord nicknames based on a custom template. You can define separate formats for family members and non-family members.

<mark style="color:blue;">**/nickname config**</mark>

***

### Family Nickname Format

Applied to members who are in the family (linked to a tracked clan).

<mark style="color:blue;">**/nickname config**</mark> <mark style="color:purple;">**family\_nickname\_format:**</mark> `{TH} | {NAME} | {ROLE}`

Must include at least one name variable: `{PLAYER_NAME}` or `{DISCORD_NAME}` or `{DISCORD_USERNAME}`.

### Non-Family Nickname Format

Applied to members who are linked but not in any tracked clan.

<mark style="color:blue;">**/nickname config**</mark> <mark style="color:purple;">**non\_family\_nickname\_format:**</mark> `{NAME}`

Cannot include clan-specific variables like `{CLAN}`, `{ALIAS}`, or `{ROLE}`.

Set either format to `none` to disable it.

***

### Available Variables

| Variable                             | Description                                                                                               |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------- |
| `{NAME}` or `{PLAYER_NAME}`          | In-game player name                                                                                       |
| `{TH}` or `{TOWN_HALL}`              | Town Hall level                                                                                           |
| `{TH_SMALL}` or `{TOWN_HALL_SMALL}`  | Town Hall level (smaller format)                                                                          |
| `{ROLE}` or `{CLAN_ROLE}`            | In-game clan role (default labels: `Lead`, `Co-Lead`, `Eld`, `Mem` — customizable, see Role Labels below) |
| `{ALIAS}` or `{CLAN_ALIAS}`          | Clan alias                                                                                                |
| `{ALIASES}` or `{CLAN_ALIASES}`      | All clan aliases                                                                                          |
| `{CLAN}` or `{CLAN_NAME}`            | Clan name                                                                                                 |
| `{DISCORD}` or `{DISCORD_NAME}`      | Discord display name                                                                                      |
| `{USERNAME}` or `{DISCORD_USERNAME}` | Discord username                                                                                          |

**Example formats:**

* `{NAME} | {TH} | {ROLE}` → `WarriorKing | TH16 | Co-Lead`
* `{ROLE} | {TH} | {NAME}` → `Lead | TH16 | WarriorKing`
* `{NAME} | {TH} | {ALIAS}` → `WarriorKing | TH16 | WR`

***

### Role Labels

The `{ROLE}` variable uses short labels. You can customize them from the `/nickname config` menu.

| Role      | Default Label |
| --------- | ------------- |
| Leader    | `Lead`        |
| Co-Leader | `Co-Lead`     |
| Elder     | `Eld`         |
| Member    | `Mem`         |

***

### Auto Updates

<mark style="color:blue;">**/nickname config**</mark> <mark style="color:purple;">**change\_nicknames:**</mark> `Yes`

When enabled, nicknames update automatically alongside Auto Role.

{% hint style="info" %}
Auto Role must be enabled for nickname changes to run automatically. Use `/autorole refresh` to manually trigger a refresh, or nicknames also update when an account is linked.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.clashperk.com/features/nickname.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
