# Setting up Discord bots

### Creating a Discord bot&#x20;

1. Go to <https://discord.com/developers/applications/>
2. Create an Application
3. Give the application an awesome name (this will be used as the bot's initial username)
4. Click **Save Changes**
5. Open the **Bot** tab
6. Click **Add Bot** and confirm
7. Make sure to make your bot set to non-public by changing the slot labeled "public bot"
8. Make sure to change the bot's username & profile picture in this tab as well

### IMPORTANT \*\*

Discord Link requires you to enable specific Discord "Intentions". On the Discord developer portal bot page, scroll down on your application and enable the following options:

<figure><img src="https://1689193522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIii9qw8mT5eNtVJABFb%2Fuploads%2FeTRH9zH3zcKbbOBFamsS%2F7eb585633927c70311e1d76b633a9a54.png?alt=media&#x26;token=63b74f01-7247-46a9-b7a1-39609074b355" alt=""><figcaption></figcaption></figure>

### Configuring your Linking Bot

The following configuration settings **must be configured** for your bot to work correctly!

```yaml
discord-bot-settings:
  run-bot-on-instance: true
  bot-token: '<your-bot-token-copied-from-above>'
  discord-guild-id: '<your-servers-discord-guild-id>'
  member-role-id: '<discord-linked-role>'
```

The Discord guild, role, and token must be configured for your Discord Linking bot to start & enable correctly. Missing any of these options may cause your bot to fail Discord commands or linking!&#x20;

{% hint style="danger" %}
The Discord bot can only **run on one server**, but **unlimited servers can connect** **together** via our databasing system to share the same data. Make sure when configuring, you only have the bot running on one server
{% endhint %}

### User Permissions

Discord members will require access to use `/slash commands` in the channel(s) you want them to be able to use the Discord linking command.&#x20;

<figure><img src="https://1689193522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIii9qw8mT5eNtVJABFb%2Fuploads%2FawqXz3aNhV4BW0AWXMpp%2F96093923afde76ef6b59d30ad849709b.png?alt=media&#x26;token=fd8c938b-473b-43a2-a62a-3679e653afe3" alt=""><figcaption></figcaption></figure>
