Buda LogoBuda

Connect Discord Bot

How to configure and connect a Discord bot to Buda for two-way AI conversations.

Connect Discord Bot

Buda supports connecting to Discord bots via the native Gateway (WebSocket) protocol. This means you do not need to configure any Webhook URLs or public endpoints. By simply providing a Bot Token, Buda will automatically establish a persistent connection in the background to achieve real-time, two-way conversations and streaming message replies.

Step 1: Create an App on the Discord Developer Portal

  1. Open and log in to the Discord Developer Portal.
  2. Click New Application in the top right corner.
  3. Enter an application name (e.g., Buda Assistant), agree to the terms, and click Create.

Step 2: Get the Bot Token and Enable Critical Intents

  1. In the left menu, click the Bot tab.
  2. (If prompted with "Build-A-Bot", click "Add Bot" and confirm).
  3. Find the Token section, click Reset Token, and copy the generated Token (you will paste this into Buda later).
  4. [CRITICAL] Scroll down the page to the Privileged Gateway Intents section.
  5. Find and toggle on the Message Content Intent. If this is not enabled, the bot will not be able to read the contents of messages sent by users!
  6. Click Save Changes at the bottom.

Step 3: Invite the Bot to Your Server

  1. In the left menu, go to OAuth2 -> URL Generator.
  2. Under the Scopes section, check the box for bot.
  3. In the Bot Permissions section that appears below, check:
    • Send Messages
    • Read Messages/View Channels
    • Embed Links
    • Attach Files
    • Add Reactions
    • (Alternatively, you can just check Administrator for ease of setup)
  4. Copy the Generated URL at the bottom of the page.
  5. Open this URL in a new browser tab, select your Discord server, and click Authorize to invite the bot.

Step 4: Configure the Token in Buda

  1. Open the Channels Settings page in your Buda system.
  2. Click Add Channel and select Discord as the provider.
  3. Paste the Bot Token you copied earlier into the input field.
  4. Click Save.

Once saved successfully, Buda will immediately connect to the Discord servers in the background using WebSockets.

Step 5: Start Chatting

Now, you can @mention your bot in any channel of your Discord server and send a message, or send a Direct Message (DM) to the bot. Buda's AI Agent will process your message in real-time and reply with streaming (chunked) text!

On this page