# 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="/files/LbPsDfNDYRwDCYOupvAH" 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="/files/cqT4xa93kkXaf4XHbQKs" alt=""><figcaption></figcaption></figure>


---

# 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://docs.supremeventures.ca/freebies/discord-link/setting-up-discord-bots.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.
