> 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/overview/getting-set-up.md).

# How to Set Up ClashPerk on Discord

Add ClashPerk to your Discord server, link your Clash of Clans clan with /setup clan, then turn on war, clan and capital logs for it.

Add ClashPerk to your server from [clashperk.com](https://clashperk.com), then run <mark style="color:blue;">**/setup clan**</mark> with your clan tag. That's all ClashPerk needs to start tracking your clan. A default clan per channel, a clan embed and logs are optional.

## 1. Invite the bot to your server

Before you can run any command, ClashPerk needs to be in your server. Head to [clashperk.com](https://clashperk.com) and use **Add to Discord**, then pick your server and approve the requested permissions. You need the Manage Server permission in that server.

{% hint style="info" %}
Already have ClashPerk in another server? Run <mark style="color:blue;">**/invite**</mark> from any server where the bot is present to get the invite link.
{% endhint %}

## 2. Link a clan to your server (required)

This adds your clan to the server, so the bot starts tracking it.

<mark style="color:blue;">**/setup clan**</mark> <mark style="color:purple;">**clan:**</mark> `#CLAN_TAG`

{% hint style="info" %}
If the bot asks you to verify, the clan is already linked in many other servers or your server has reached its clan limit. Verify a leader or co-leader account with <mark style="color:blue;">**/verify**</mark> (see [Link account](https://docs.clashperk.com/overview/link-account.md)), then run the command again. [Clan verification](https://docs.clashperk.com/faq.md#what-is-clan-verification) explains when it's needed.
{% endhint %}

## 3. Set a default clan for a channel (optional)

Link a clan to a channel, one clan per channel. Commands run in that channel then use the clan without you entering or picking its tag. Repeat it to link the clan in more channels.

<mark style="color:blue;">**/setup clan**</mark> <mark style="color:purple;">**clan:**</mark> `#CLAN_TAG` <mark style="color:purple;">**clan\_channel:**</mark> `#general`

## 4. Create a clan embed (optional)

A clan embed showcases your clan in a public channel.

<mark style="color:blue;">**/setup clan-embed**</mark> <mark style="color:purple;">**clan:**</mark> `#CLAN_TAG`

## 5. Turn on logs (optional)

If you don't pick a channel, logs go to the current channel.

<mark style="color:blue;">**/setup clan-logs**</mark> <mark style="color:purple;">**clan:**</mark> `#CLAN_TAG` <mark style="color:purple;">**action:**</mark> `Enable` <mark style="color:purple;">**channel:**</mark> `#channel`

Pick the logs you want from the menu that appears. Clan, capital, war and player logs are all available. For every log and what it posts, see [Clan, War and Capital Logs](https://docs.clashperk.com/features/logs.md).

To turn a log off:

<mark style="color:blue;">**/setup clan-logs**</mark> <mark style="color:purple;">**action:**</mark> `Disable` <mark style="color:purple;">**clan:**</mark> `#CLAN_TAG`

## Next steps

* [Link your Clash of Clans account](https://docs.clashperk.com/overview/link-account.md) so commands know who you are.
* [Auto Roles](https://docs.clashperk.com/features/auto-role.md) give members Discord roles from their clan role, Town Hall and league.
* [Reminders](https://docs.clashperk.com/features/reminders.md) ping members who still have attacks left.
* [CWL and War Rosters](https://docs.clashperk.com/features/rosters.md) run signups with a button.


---

# 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/overview/getting-set-up.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.
