# 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="https://1313681687-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNdEPE8uDgCdqMBOotw%2Fuploads%2FB6iptdQhGLpHby5xYtog%2Fimage.png?alt=media&#x26;token=87efe81e-d7c7-484e-8bd3-1dc6d1b3bfd2" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1313681687-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNdEPE8uDgCdqMBOotw%2Fuploads%2FWVx8eUXUS9vyhiJ3Bnqs%2Fimage.png?alt=media&#x26;token=19947ee2-f0da-4243-a810-1f06765db9e6" 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="https://1313681687-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNdEPE8uDgCdqMBOotw%2Fuploads%2F4qBqsjPyOmemKc2CV8v7%2Fimage.png?alt=media&#x26;token=0a0174fb-7c22-4abb-8321-2288d5cb7da6" alt=""><figcaption></figcaption></figure>

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