# Setup Custom Bot

Before we start:

* Make sure you have the [gold premium](https://flavibot.xyz/premium).
* Make sure you have the premium enabled on your server with `/premium activate`

## 1/ Go to Discord's developer portal and create an application

Go to <https://discord.com/developers/applications>, log in with your Discord account if this is not the case, and press the **"New Application"** button.

<figure><img src="https://media.discordapp.net/attachments/748897200955981904/1068990484258750594/img.png" alt=""><figcaption></figcaption></figure>

Give a name to your application, agree with Discord policies and press **Create**. Don't worry about it now, **you can always change the name of your bot at any time!**\\

<figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/101052331721/original/nOel__-zUMKCd6xR2cqf9cU9uWx0wWAAEQ.png?1671547936" alt=""><figcaption></figcaption></figure>

## 2/ Add a bot to your application

Go to the Bot tab of your application, and press **Add Bot**. You will get a confirmation modal, press **Yes, do it!**.

<figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/101052331731/original/ikz8RpgiM6sM6DVoAp1yDMmXQ7h2KzXgsA.png?1671547936" alt=""><figcaption></figcaption></figure>

## 3/ IMPORTANT: Enable Intents

Scroll down to the **Privileged Gateway Intents** section and enable the **"Presence Intent"**, **"Server Members Intent”** and the **“Message Content Intent”**.

<figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/101052331769/original/rE8BAWlzHVANhRpHmSO3M24G9LtUS7KDqA.png?1671547938" alt=""><figcaption></figcaption></figure>

## 4/ Get your token

Press the **"Click to Reveal Token"** or **“Reset Token”** button to see your token. You will get a confirmation modal, press **Yes, do it!**.

<figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/101052331766/original/4fjGqxju7VE7nKke-Gt5VTEAPN0jpuHuDg.png?1671547938" alt=""><figcaption></figcaption></figure>

<figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/101052331762/original/Gp-CUv0lz9yXcPmNkqOuFDK3BpaIG3fHRQ.png?1671547938" alt=""><figcaption></figcaption></figure>

Now you should see your token, just like in the screenshot above, copy it!

{% hint style="danger" %}
This token is super secret and you should never give it to anyone else without knowing why or you risk someone else taking over your bot.
{% endhint %}

## 5/ Enable the bot on the dashboard

Enable by clicking the switch at the top right like this:

<figure><img src="https://1313681687-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNdEPE8uDgCdqMBOotw%2Fuploads%2FViYFolmW3mrcrqbqjgHi%2Fimage.png?alt=media&#x26;token=1c0ae008-21d8-4853-a36f-2746838544f7" alt=""><figcaption></figcaption></figure>

Set the token by clicking `Edit bot token` &#x20;

<figure><img src="/files/3YH0uYmBHrg7a7lhwfGU" alt=""><figcaption></figcaption></figure>

Now input the bot token into the `Bot token` field

<figure><img src="/files/9DI5rTV5XQiL7akwydJT" alt=""><figcaption></figcaption></figure>

Now all you have to do is press the `Start` button and your custom bot is up and running! \
Click `add your bot` to add it to your server.&#x20;

<figure><img src="/files/R8iGpCI2UapzAKQYj30Z" alt=""><figcaption></figcaption></figure>

You can add some more configuration like bot activity and change the bot's prefix.


---

# Agent Instructions: 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:

```
GET https://guide.flavibot.xyz/d/setup-custom-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
