Use Discord when you want to DM your assistant directly or mention it in a server channel.
Cue and OpenClaw use separate Discord config files. Cue reads ~/.cue/config.json or ~/.cue/agents/<agent>/agent.json. OpenClaw uses ~/.openclaw/openclaw.json.
If you are setting up Discord for OpenClaw inside a sandbox, use the OpenClaw docs instead: /openclaw/setup/discord.

Before You Start

  • You need a Discord account with access to the Developer Portal.
  • Cue Discord runtime currently reads config from ~/.cue/config.json or a per-agent override in ~/.cue/agents/<agent>/agent.json.
  • ~/.cue/agents/<agent>/channel-config.json is not the runtime source of truth for Discord.

Step 1: Create the Discord Application

In the Discord Developer Portal:
  1. Click New Application.
  2. Pick a name for the bot.
  3. Open the new application.
This application is the container for the bot identity and token.

Step 2: Add the Bot and Copy the Token

In the application:
  1. Open the Bot page.
  2. Click Add Bot if the app does not already have one.
  3. Use Reset Token or Copy to get the bot token.
Treat the token like a password. Do not commit it or paste it into public docs.

Step 3: Enable the Right Bot Behavior

On the same Bot page:
  • Enable Message Content Intent if you want Cue to read messages in server channels.
  • Keep this off only if you plan to use DM-only workflows.
Cue can reply in DMs or server channels, but server-channel inbound routing is much easier when message content is available.

Step 4: Install the Bot in Discord

In the Developer Portal:
  1. Open Installation.
  2. Under Installation Contexts, enable Guild Install.
  3. Under Default Install Settings for Guild Install, include bot and applications.commands.
  4. Give the bot at least the permissions needed for your test server, such as sending messages.
  5. Copy the install link and open it in your browser.
  6. Authorize the bot into the server where you want to use it.
For Cue today, Guild Install is the correct path. Discord also supports User Install, but that flow is command-oriented and does not match Cue’s current bot-token channel runtime. For a first pass, keep the target narrow: one server or one test channel is easier to validate than a wide install. If the app does not show up in the server member list or in the @ mention picker after install, check Installation again. The most common cause is missing bot under Guild Install. Re-copy the install link and authorize the server again after fixing it.

DM or Server Channel?

For the current Cue setup:
  • Install the bot to a server first.
  • After the bot is in a shared server with you, test either by DM or by mentioning it in a server channel.
  • If you want the simplest first validation, use one private test channel in that server.

Step 5: Add the Token to Cue

Edit one of these files:
  • Global config: ~/.cue/config.json
  • Per-agent override: ~/.cue/agents/<agent>/agent.json
Start with global config unless you already run multiple agents with different bot identities. Example:
{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "<DISCORD_BOT_TOKEN>",
      "requireMention": true,
      "typingIndicator": true,
      "channelIds": [],
      "guildIds": [],
      "dm": {
        "policy": "open",
        "allowFrom": []
      },
      "group": {
        "policy": "open",
        "allowFrom": []
      }
    }
  }
}
Notes:
  • requireMention: true means Cue only responds in server channels when the bot is mentioned.
  • channelIds can stay empty at first. Add specific channel IDs later if you want a tighter allowlist.
  • dm.policy and group.policy accept open, allowlist, or disabled.

Step 6: Restart Cue

After saving config:
cue -m restart --json
If you use a specific agent:
cue -m restart --agent <agent> --json

Step 7: Validate

Check runtime status:
cue channel status --json
cue channel targets --json
Then send a small test:
  • DM the bot directly, or
  • mention it in a server channel if group.policy is enabled

Sandbox / code-server Setup

If you are doing this inside a Cue sandbox or code-server session, the same config belongs inside the sandbox home directory:
  • /home/user/.cue/config.json
  • /home/user/.cue/agents/<agent>/agent.json
Open the file in code-server, save the token there, then restart Cue inside the sandbox terminal.

Troubleshooting

  • Bot appears online but does not answer in a server: Enable Message Content Intent, restart Cue, and confirm you mentioned the bot when requireMention is true.
  • Bot was authorized but does not appear in the server member list or @ picker: Go back to Installation, confirm Guild Install is enabled, and make sure both bot and applications.commands are selected. Then reinstall the app to the server.
  • Bot answers in DMs but not in a server: Check group.policy, guildIds, and channelIds.
  • You edited channel-config.json and nothing changed: Move the config into agent.json or ~/.cue/config.json.
  • You run both Cue and OpenClaw: Confirm which token belongs to which runtime before changing anything.