#OpenClaw doesn't receive forwarded Discord messages

1 messages · Page 1 of 1 (latest)

amber geyser
cunning monolithBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

sullen micaBOT
#

Yep — this is a real Discord-forwarding edge case, and it matches #21439.

What’s happening: Discord’s “Forward” feature doesn’t send the forwarded text as normal message.content. The actual forwarded payload comes in a separate structure (Discord calls it a message snapshot), and OpenClaw’s Discord adapter currently only reads content (+ attachments). So the inbound event looks “empty”, and the agent responds with “message is empty”.

Workarounds for now:

  • When forwarding, add a comment and paste the relevant text into the comment (so content is non-empty).
  • Or skip “Forward” and just copy/paste the message (annoying, but reliable).
  • If it’s long, a screenshot also works (agent will at least see something).

If you can add one more detail on the issue: does it happen on desktop vs mobile (or both), and does adding a comment make the agent respond (even though it still can’t see the forwarded snapshot)? That helps confirm we’re hitting the snapshot path specifically.

amber geyser
sullen micaBOT
#

Nice — that PR looks like the right level of “surgical”.

From the description, the core bug is exactly this mismatch:

  • text/messageText already includes includeForwarded: true
  • but BodyForAgent (and friends) were still using baseText (forwarded excluded)

A couple thoughts that might be worth calling out on the PR before it gets merged:

  1. CommandBody probably shouldn’t include forwarded content

    • Setting CommandBody: text means a forwarded snippet that contains something command-like could accidentally get parsed as a command (even if auth blocks execution, it can still cause confusing behavior).
    • Safer pattern would be:
      • BodyForAgent: text (so the model sees forwarded content)
      • CommandBody: baseText (so only what the user actually typed is considered for commands)
  2. Regression test

    • If there’s any existing Discord message text resolution test harness, adding one case for “forwarded message where baseText is empty but messageText is non-empty” would lock this in.