Skip to content

Discord DMs: inbound messages silently dropped (outbound works) #48641

@ngmeyer

Description

@ngmeyer

Bug Description

Discord inbound DMs from an allowlisted user are silently dropped by the gateway. Outbound DMs (bot → user) work correctly. Guild channel messages work correctly.

Environment

  • OpenClaw version: 2026.3.13 (61d171a)
  • OS: macOS 26.3.1 (arm64)
  • Node: v25.8.0
  • Discord bot count: 4 active (default + 3 accounts)
  • Channel: stable

Configuration

{
  "channels": {
    "discord": {
      "dmPolicy": "allowlist",
      "allowFrom": ["339919070654758912"],
      "accounts": {
        "default": {
          "dmPolicy": "allowlist",
          "allowFrom": ["339919070654758912", "..."]
        }
      }
    }
  }
}

Steps to Reproduce

  1. Configure Discord with dmPolicy: "allowlist" and user ID in allowFrom
  2. Confirm bot is connected: openclaw channels status shows connected
  3. Send a DM to the bot from the allowlisted Discord user
  4. No response, no log entry — message is silently dropped

Expected Behavior

  • Inbound DM should appear in gateway logs
  • Message should be routed to the agent session
  • Agent should respond in the DM channel

Actual Behavior

  • Zero log output for inbound DMs — tail -f gateway.log | grep discord shows nothing when a DM is sent
  • Outbound DMs work: POST /api/v10/users/@me/channels + POST /channels/{id}/messages succeeds
  • Guild channel messages are received and processed normally
  • Bot token is valid (verified via Discord REST API GET /users/@me)
  • openclaw pairing list discord shows no pending requests
  • No discord-allowFrom.json file exists in ~/.openclaw/credentials/

Diagnostic Evidence

# Bot is connected
$ openclaw channels status
- Discord default: enabled, configured, running, connected, bot:@Aria, token:config, intents:content=limited

# Outbound DM works
$ curl -X POST ".../channels/{dm_channel}/messages" → 200 OK, message delivered

# Inbound DM produces zero logs
$ tail -f gateway.log | grep -i "discord\|dm\|inbound\|339919"
# (60 seconds of silence after user sends DM)

Intents

OpenClaw source requests GatewayIntents.DirectMessages — confirmed in auth-profiles-DRjqKE3G.js. The bot shows intents:content=limited (expected for <100 servers).

Why This Matters

Discord DMs are the preferred primary channel for many users because:

  1. Text selection — Discord mobile allows partial text selection (Telegram does not), which is critical for copying code snippets, URLs, or specific portions of long responses
  2. Rich formatting — Full markdown, code blocks, embeds render properly in DMs
  3. Unified context — Users already have Discord open for guild channels; DMs keep everything in one app instead of splitting between Discord (channels) and Telegram (DMs)
  4. Desktop continuity — Discord desktop has full text selection, search, and history — superior to Telegram desktop for power users

Without working DMs, users are forced to use guild channels (which lack privacy for personal assistant tasks) or fall back to Telegram (losing text selection). This significantly degrades the experience for Discord-primary users.

Workaround

Using Discord guild channels (#general, #aria) for interactive work + Telegram for private DM conversations. Functional but fragmented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions