> For the complete documentation index, see [llms.txt](https://docs.sourcefactory.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sourcefactory.eu/discord-utilities/tutorials/setting-up-a-discord-bot.md).

# Setting Up a Discord BOT

{% hint style="danger" %}
Be sure to follow the correct procedure when setting Gateway Intents and Permissions.
{% endhint %}

### Steps

1. Go to the official Discord Developer Portal - <https://discord.com/developers/applications>
2. Click on the <mark style="color:blue;">`New Application`</mark> and type a name for the BOT

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

3. Next, go to the <mark style="color:blue;">`Bot`</mark> page and in the Privileged Gateway Intents allow `Server members intent` and `Message content intent`

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

4. Next, go to the <mark style="color:blue;">`OAuth2`</mark> page&#x20;

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

5. And then go to the OAuth2 URL Generator section and check `applications.commands` and `bot` in Scopes and in Bot permissions check `Administrator`

<div align="center" data-full-width="false"><figure><img src="/files/GBW8ujcUNXw9fMOEh0sQ" alt=""><figcaption></figcaption></figure></div>

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

6. Then just copy the Generated URL and paste it into your browser to invite the bot to your Discord server.
