Skip to main content
Discord integration allows interaction with the Gclaw AI assistant in Discord servers. This requires creating a Discord bot application and configuring the Gclaw instance with the bot token. A running Gclaw instance, a Discord account, and administrator access to a Discord server are required.
TipAsk the Gclaw assistant directly: “How do I connect Discord?” The assistant provides interactive instructions in the chat.

Step 1: Create a Discord bot

To create a bot application and obtain a bot token:
  1. Go to the Discord Developer Portal.
  2. Click New Application.
  3. Enter a name for the application (such as “Gclaw Bot”) and click Create.
  4. In the left sidebar, click Bot.
  5. Click Add Bot, then confirm by clicking Yes, do it!.
  6. Under Privileged Gateway Intents, enable Message Content Intent to allow reading message content.
  7. Click Reset Token, then click Copy to copy the bot token.
WarningKeep the bot token secure. Anyone with access to this token can control the bot. If the token is compromised, reset it immediately in the Developer Portal.

Step 2: Add the token to OpenClaw

In the Gclaw chat interface, provide the bot token to the assistant: “I have a Discord bot token: YOUR_TOKEN_HERE - can you add it to my configuration?” The assistant applies the token directly to the OpenClaw configuration. The gateway automatically restarts and the Discord bot becomes active within seconds.
Gclaw providing Discord connection instructions

Step 3: Invite the bot to a server

To add the bot to a Discord server:
  1. In the Discord Developer Portal, navigate to the application.
  2. In the left sidebar, click OAuth2 > URL Generator.
  3. Under Scopes, select bot.
  4. Under Bot Permissions, select the following permissions:
    • Read Messages/View Channels
    • Send Messages
    • Read Message History
  5. Copy the generated URL at the bottom of the page.
  6. Open the URL in a browser.
  7. Select the server where the bot should be added and click Authorize.
  8. Complete any verification prompts.

Verify the connection

After adding the bot to the server, go to a text channel where the bot has access and send a test message mentioning the bot. The Gclaw assistant should respond to the message.
WarningIf no response is received, verify that the bot token is correct, the bot has the required permissions in the channel, the Message Content Intent is enabled, and the Gclaw instance is running. If the instance is unresponsive, click Restart Instance in the Settings panel.

Required permissions

PermissionDescription
Read Messages/View ChannelsAllows the bot to see channels and read messages
Send MessagesAllows the bot to send responses
Read Message HistoryAllows the bot to read previous messages for context

Advanced configuration

Additional Discord configuration options are available by asking the Gclaw assistant:
  • “Configure Discord to require @mentions”
  • “How do I enable threading for Discord?”
  • “How do I set up role-based access for Discord?”
The assistant provides specific configuration commands for each option.