# Discord Connect your Botpress bot to Discord to send and receive messages across servers, threads, and direct messages. ## Prerequisites - A Discord account with permission to create applications - Access to the [Discord Developer Portal](https://discord.com/developers/applications) --- ## Step 1: Create a Discord Application 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and sign in. 2. Click **New Application** in the top-right corner. 3. Give your application a name and click **Create**. --- ## Step 2: Create a Bot User 1. In your application's left sidebar, click **Bot**. 2. Under the bot's username, you can optionally set a custom avatar and display name. 3. Under **Privileged Gateway Intents**, enable the following: - **Message Content Intent** - **Server Members Intent** 4. Click **Save Changes**. --- ## Step 3: Copy Your Bot Token 1. Still on the **Bot** page, click **Reset Token** (or **Copy** if a token is already visible). 2. Confirm the reset if prompted. 3. **Copy the token** and store it somewhere safe — you will not be able to see it again. --- ## Step 4: Invite the Bot to Your Server 1. In the left sidebar, click **OAuth2** > **URL Generator**. 2. Under **Scopes**, select: - `bot` - `applications.commands` 3. Under **Bot Permissions**, select the permissions your bot requires. At minimum: - **View Channels** - **Send Messages** - **Create Public Threads** - **Create Private Threads** - **Send Messages in Threads** - **Pin Messages** - **Attach Files** - **Read Message History** - **Add Reactions** - **Create Polls** 4. Copy the generated URL at the bottom of the page and open it in your browser. 5. Select the server you want to add the bot to and click **Authorize**. --- ## Step 4: (Alternate) 1. In the left sidebar, click **Installation**. 2. Under **Default Install Settings** > **User Install**, select: - `bot` - `applications.commands` 3. Under **Default Install Settings** > **Guild Install**, select the permissions your bot requires. At minimum: - **View Channels** - **Send Messages** - **Create Public Threads** - **Create Private Threads** - **Send Messages in Threads** - **Pin Messages** - **Attach Files** - **Read Message History** - **Add Reactions** - **Create Polls** 4. Copy the generated URL under **Install Link** and open it in your browser. 5. Select the server you want to add the bot to and click **Authorize**. --- ## Step 5: Configure the Integration in Botpress In your Botpress integration configuration, fill in the following fields: - **Bot Token** _(required)_: Paste the bot token copied from the Discord Developer Portal (Step 3). - **Bot Name** _(optional)_: Overrides the display name shown as the sender in Botpress. - **Bot Avatar URL** _(optional)_: URL of an image to use as the bot's avatar in Botpress.