Skip to content

Connect OpenClaw to Discord

Integrating OpenClaw with Discord allows you to interact with your local AI directly through a chat interface. We will configure a Discord Developer app, create a private server, and link the agent.

Before configuring the developer tools, ensure you have an active Discord account.

  • Navigate to Discord.com and log in.
  • If you do not have an account, click Register and complete the standard email verification process.

Step 2: Discord Developer Portal & Bot Creation

Section titled “Step 2: Discord Developer Portal & Bot Creation”

We must create an “Application” in Discord’s backend to generate the bridge for OpenClaw.

  1. Go to the Discord Developer Portal.
  2. Click the New Application button in the top right.
  3. Name your bot (e.g., “TechBitNow-Agent”) and click Create.
  4. On the left menu, navigate to the Bot tab.
  5. Scroll down to the Privileged Gateway Intents section. You must toggle ON these specific permissions so OpenClaw can read and reply to messages:
    • Presence Intent
    • Server Members Intent
    • Message Content Intent
  6. Click Save Changes at the bottom of the screen.

Step 3: Create a Server & Authorize the Bot

Section titled “Step 3: Create a Server & Authorize the Bot”

To give OpenClaw a place to operate, we need a dedicated server and an authorization link.

Creating a New Server (If you don’t have one):

  1. Open your main Discord app or web interface.
  2. Click the green ”+” icon (Add a Server) at the bottom of your left-hand server list.
  3. Select Create My Own -> For me and my friends.
  4. Name the server (e.g., “OpenClaw Testing Ground”) and click Create.
  5. Inside your new server, click the default #general channel, click the Edit Channel (gear icon), and rename it to something specific like #ai-chat.

Generating the Invite Link:

  1. Return to the Discord Developer Portal.
  2. Select your OpenClaw application and go to the OAuth2 tab on the left.
  3. Under OAuth2 URL Generator, check the box for bot.
  4. Scroll down to Bot Permissions and select Administrator (or explicitly check Read Messages/View Channels, Send Messages, and Read Message History).
  5. Copy the Generated URL at the bottom of the page.
  6. Paste this URL into a new browser tab.
  7. Select your newly created server from the dropdown list and click Authorize.

Your bot is now offline and sitting in your Discord server, waiting for OpenClaw to connect to it!

To link OpenClaw to your specific chat, you need to extract three unique IDs from Discord: the Server ID, Channel ID, and your personal User ID.

Enable Developer Mode:

  1. Open Discord and click the User Settings (gear icon) next to your name at the bottom left.
  2. Scroll down the left menu to the “App Settings” section and click on Advanced.
  3. Toggle Developer Mode to ON.

Copy the 3 Required IDs:

  • Server ID: Right-click your new Server’s icon on the far-left sidebar and select Copy Server ID.
  • Channel ID: Right-click the specific text channel (e.g., #ai-chat) and select Copy Channel ID.
  • User ID: Right-click your own profile name in the chat or the right-hand member list and select Copy User ID.

Paste all three IDs into a temporary notepad file so they are ready for the next step.

To ensure maximum stability and avoid breaking the JSON configuration file, we will let OpenClaw configure itself using its built-in wizard.

  1. Open your Ubuntu Terminal.
  2. Run the OpenClaw setup wizard.
  3. Follow the on-screen prompts for the Discord integration.
  4. When prompted, paste your Server ID, Channel ID, and User ID exactly as you copied them.
  5. (Note: If the wizard also asks for a Bot Token, you can find this back in the Discord Developer Portal under the Bot tab by clicking “Reset Token”).
  6. Complete the wizard and allow OpenClaw to automatically update your openclaw.json file.
  7. Restart the OpenClaw gateway to bring the Discord bridge online.

Open Discord, navigate to your #ai-chat channel, and type a message. Your local LLM should now reply directly in the server!


With Discord fully operational, we can now expand OpenClaw’s capabilities by bridging it to Telegram. The process involves generating a bot through BotFather and feeding the credentials into OpenClaw.

Proceed to the OpenClaw Telegram Guide ->