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

# Getting set up

#### Invite the bot to your server (do this first)

<details>

<summary>Add ClashPerk</summary>

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

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

</details>

#### Link a clan to your Discord Server (required)

<details>

<summary>Link to Server</summary>

The following command allows you to quickly add your clan to the server, enabling the bot to track it.

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

</details>

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

<details>

<summary>Link to Channel</summary>

Allows you to link a clan to a channel. (one clan per channel)

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

* [x] This link enables you to run commands without entering or selecting a clan tag.
* [x] You can repeat the process to link the clan in multiple channels.

</details>

#### Create a Clan Embed (optional)

<details>

<summary>Clan Embed</summary>

Clan embed is for showcasing your clans in a public channel.

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

</details>

#### Enable Logs (optional)

**Initiate Setup**

If you don't select a channel, it defaults to the current channel.

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

Clan Logs:

* Clan Achievements Log
* Donation Log (Instant/Daily/Weekly/Monthly)
* Clan Games Embed Log
* Last Seen Embed Log
* Legend Attacks Daily Summary Log

Capital Logs:

* Clan Capital Weekly Summary Log
* Capital Gold Contribution Log
* Capital Gold Raid Log

War Logs:

* War Attack Log
* CWL Attack Log
* War Embed Log
* War Missed Attacks Log
* CWL Embed Log
* CWL Missed Attacks Log
* CWL Lineup Change Log
* CWL Monthly Summary Log

Player Logs:

* Member Join/Leave Log
* Role Change Log
* Name Change Log
* Town Hall Upgrade Log
* War Preference Log
* Ranked Battle League Change Log

{% hint style="info" %}
For more information, see [Logs](/features/logs.md)
{% endhint %}

**Disable a Log**

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


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clashperk.com/overview/getting-set-up.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
