> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch03-channel-setup/3.2-discord-and-slack.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 3.2 Connecting Discord and Slack

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~214,000 tokens, Output \~9,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

## 3.2.1 Discord: Full Setup

Discord takes more steps than Telegram but supports richer features — threads, polls, component UI, and draft streaming.

### Creating the application

1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and create a **New Application**;
2. In the **Bot** tab, click **Add Bot**;
3. **Reset Token** and copy it — this is shown once;
4. Under **Privileged Gateway Intents**, enable:

| Intent                     | Why                                                            |
| -------------------------- | -------------------------------------------------------------- |
| **MESSAGE CONTENT INTENT** | **Required.** Without it the bot receives empty message bodies |
| SERVER MEMBERS INTENT      | Optional; needed for member enumeration                        |
| PRESENCE INTENT            | Usually unnecessary                                            |

> **The most common Discord setup failure is forgetting MESSAGE CONTENT INTENT.** The bot connects successfully, sees messages arrive, and every body is empty. If your logs show messages with no content, this is why.

### Inviting the bot

In **OAuth2 → URL Generator**:

* Scopes: `bot` and `applications.commands` (the latter enables native slash commands);
* Bot Permissions: at minimum `Send Messages`, `Read Message History`, and `Use Slash Commands`; add `Attach Files` and `Add Reactions` if you want media and reactions.

Open the generated URL and pick a server.

### Configuration

```json5
{
  channels: {
    discord: {
      enabled: true,
      token: "${DISCORD_BOT_TOKEN}",
      allowFrom: ["your-discord-user-id"],
      guilds: ["your-server-id"],        // server allowlist
    },
  },
}
```

**`guilds` is an allowlist.** A server not listed is dropped outright (§19.4 covers where in the preflight this happens). That prevents someone inviting your bot into a server you don't know about.

To get IDs, enable **Developer Mode** in Discord (Settings → Advanced), then right-click a user or server and choose **Copy ID**.

### Channel-level control

```json5
{
  channels: {
    discord: {
      channels: {
        "123456789": { enabled: true },     // by ID
        "general": { enabled: false },       // by name
      },
    },
  },
}
```

## 3.2.2 Slack: Bolt Integration

### Creating the app

1. Go to [api.slack.com/apps](https://api.slack.com/apps) → **Create New App** → **From scratch**;
2. Under **Socket Mode**, enable it and generate an **App-Level Token** (starts with `xapp-`);
3. Under **OAuth & Permissions**, add Bot Token Scopes:

```
app_mentions:read
channels:history
chat:write
im:history
im:write
```

4. **Install to Workspace** and copy the **Bot User OAuth Token** (starts with `xoxb-`);
5. Under **Event Subscriptions**, enable events and subscribe to `message.im` and `app_mention`.

### Configuration

```json5
{
  channels: {
    slack: {
      enabled: true,
      botToken: "${SLACK_BOT_TOKEN}",     // xoxb-
      appToken: "${SLACK_APP_TOKEN}",     // xapp-
      allowFrom: ["U01234567"],            // Slack user IDs
    },
  },
}
```

**Socket Mode needs no public address** — the same advantage as Telegram long polling, and the reason it's recommended over the HTTP events path for a personal machine.

### One Slack quirk

**Slack reserves `/status`.** OpenClaw registers it as `/agentstatus` instead through the override table (§33.4.2).

The comment in the source is worth knowing: registering a reserved name doesn't just fail for that command — **it invalidates the entire slash\_commands manifest**, so nothing registers. If your Slack slash commands all vanish at once, look for a name collision.

## 3.2.3 WhatsApp, Signal, and iMessage in Brief

These three take more setup and are covered in Chapter 20; a short orientation here.

| Channel      | Connection                      | Setup burden | Notes                                                                                                                    |
| ------------ | ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------ |
| **WhatsApp** | Baileys web protocol + QR scan  | Medium       | **Impersonates a client** — credentials expire and sessions get kicked (§20.6.1). No official bot API.                   |
| **Signal**   | signal-cli REST                 | High         | Requires running signal-cli separately; phone numbers are normalized to E164                                             |
| **iMessage** | imsg CLI (macOS) or BlueBubbles | High         | The official CLI bridge only sends and receives; **BlueBubbles unlocks edit/unsend/effects** and is the recommended path |

**WhatsApp's defaults deserve a note**: with no `allowFrom` configured, it defaults to **self-chat only** — you messaging yourself. That's a deliberately conservative default, since WhatsApp has no application-level identity separation.

***

## Section Summary

1. **Discord's most common failure is forgetting MESSAGE CONTENT INTENT** — the bot connects, messages arrive, and every body is empty.
2. **`guilds` is an allowlist** — an unlisted server is dropped outright, preventing your bot being pulled into servers you don't know about.
3. **Slack Socket Mode needs no public address**, the same advantage as Telegram long polling and the right choice for a personal machine.
4. **Slack reserves `/status`** (OpenClaw registers `/agentstatus`); a reserved-name collision **invalidates the entire slash command manifest**, so if all your Slack commands vanish at once, look there.
5. **WhatsApp impersonates a client** with no official bot API — credentials expire and sessions get kicked; with no `allowFrom` it defaults to **self-chat only**.
6. **For iMessage, BlueBubbles beats the official CLI bridge** — it unlocks edit/unsend/effects that the CLI can't reach.
