# Connect Discord

This guide walks you through connecting Discord to your Genie environment so your team can interact with the AI assistant directly from Discord channels and direct messages.

***

## Prerequisites

* A Genie account with a running server
* A Discord server where you have **Manage Server** permission

***

## Step 1: Open Discord Setup in Genie

Go to your Genie dashboard → **Settings** → **Channels** → **Discord** and expand **Discord bot setup instructions**.

You will see a 6-step setup summary and a field to paste your bot token.

![Genie Discord setup page with instructions](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-5153eb92bf81c2db9e030024a353079a56604c4b%2Fdiscord-setup-page.png?alt=media)

***

## Step 2: Create a Discord Application

1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and click **New Application**.

![Discord Developer Portal — Applications page](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-d4d8bfdaafe9f89d490a683e278dcb1688d43057%2Fdiscord-developer-portal.png?alt=media)

2. Name the application (e.g. "Genie"), accept the Terms of Service, and click **Create**.

![Create a new app dialog](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-701df5470a6e168dfda259375c67b4be68f197e9%2Fdiscord-create-app.png?alt=media)

You will land on the **General Information** page for your new application.

![Application General Information page](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-df561122bc6b49ee0cf95dd78214c109bb051709%2Fdiscord-general-info.png?alt=media)

***

## Step 3: Add a Bot and Copy the Token

1. In the left sidebar, go to **Bot**.

![Bot configuration page](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-e5d79643143909ececd7ec35f34308d306f94fa8%2Fdiscord-bot-settings.png?alt=media)

2. Under the **Token** section, click **Reset Token** and confirm.

![Reset Token confirmation dialog](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-0337c590f6f861169d9dacd4359fb1971689dc4d%2Fdiscord-reset-token.png?alt=media)

3. Copy the newly generated token. You will need this in a later step.

![Bot token displayed — copy it now](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-3242f52b0351d93d62deedc5c3653e1c82713d02%2Fdiscord-copy-token.png?alt=media)

***

## Step 4: Enable Privileged Gateway Intents

Scroll down to the **Privileged Gateway Intents** section on the same Bot page. Enable both:

* **Server Members Intent**
* **Message Content Intent**

Click **Save Changes**.

![Privileged Gateway Intents — enable Server Members and Message Content](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-f653347b7909667f1876547fe8156612bc8d23b9%2Fdiscord-gateway-intents.png?alt=media)

***

## Step 5: Generate an Invite URL

1. In the left sidebar, go to **OAuth2** → **URL Generator**.
2. Under **Scopes**, check `bot` and `applications.commands`.

![OAuth2 URL Generator — select scopes](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-dd587a144dc96a5872365de3a26e1dc4c51d611a%2Fdiscord-oauth2-scopes.png?alt=media)

3. Under **Bot Permissions**, check the following:

* View Channels
* Send Messages
* Embed Links
* Attach Files
* Read Message History
* Add Reactions

![Bot Permissions — select required permissions](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-e43aef8eae20e52b89818e2665bd5efc590315db%2Fdiscord-oauth2-permissions.png?alt=media)

4. Copy the **Generated URL** at the bottom of the page.

***

## Step 6: Invite the Bot to Your Server

1. Open the generated URL in your browser. Select the server you want to add the bot to and click **Continue**.

![Discord authorization — select server](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-befe91173d1b9293f571e002bc1491d360e92d0c%2Fdiscord-authorize-1.png?alt=media)

2. Review the permissions and click **Authorize**.

![Discord authorization — confirm permissions](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-191ac7b27a0645e7b6d48dba7cbf50e6c3264760%2Fdiscord-authorize-2.png?alt=media)

3. You should see a success message confirming the bot has been added.

![Authorization success — bot added to server](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-4de56c03b8975add799973ef0631732c78953806%2Fdiscord-authorize-success.png?alt=media)

***

## Step 7: Save Token in Genie

Go back to your Genie settings. Paste the bot token you copied earlier into the token field and click **Save & Connect**.

The status should change to **Connected**.

![Discord Connected status in Genie settings](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-cd52ec6e4bae4f3e220ed74e872cb7c59f5b09bd%2Fdiscord-connected.png?alt=media)

***

## Step 8: Pair Your Discord Account

1. Open Discord and send a direct message to the Genie bot (e.g. "Hey!").
2. The bot will respond with a **pairing code** and your Discord user ID.

![Discord DM showing pairing code from Genie bot](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-2a8657d2fb3e2200af3d211342b28b38caacce56%2Fdiscord-dm-pairing.png?alt=media)

3. Go back to Genie settings. Under **Pending Chat Requests**, you will see the pairing request. Click **Approve**.

![Pending chat request with Approve button in Genie settings](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-749771c79be52ca0eb674a84dca554125dfc136f%2Fdiscord-pending-request.png?alt=media)

***

## Step 9: Start Chatting

After approval, the bot confirms access in Discord. You can now interact with your AI assistant through direct messages or by @mentioning the bot in channels.

![Working example](https://253630326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy3wRNrxvvjTFreyXSBOV%2Fuploads%2Fgit-blob-2a55707815606918d7cbb299913d940ca93a7b98%2Fdiscord-working-example.png?alt=media)

***

## Tips

* Mention the bot in any channel it has access to: `@Genie how do I set up a database?`
* DM the bot for private interactions — only you see the responses
* Each user who wants to chat must complete the pairing flow individually
* Consider creating a dedicated `#genie-ai` channel to keep bot conversations organized
* The bot uses your full server context — same files, tools, and configurations as the browser
* All interactions consume credits from the Genie account that connected the bot
