openclaw - 💡(How to fix) Fix [Feature] Discord: fetch a single message by channelId + messageId (or URL) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Add an action: "fetch" (or get) to the Discord message tool that retrieves one specific message by channelId + messageId, or by parsing a Discord message URL (https://discord.com/channels/{guildId}/{channelId}/{messageId}).

Root Cause

Add an action: "fetch" (or get) to the Discord message tool that retrieves one specific message by channelId + messageId, or by parsing a Discord message URL (https://discord.com/channels/{guildId}/{channelId}/{messageId}).

Fix Action

Fixed

Code Example

{
  "action": "fetch",
  "channel": "discord",
  "channelId": "1503919293882957906",
  "messageId": "1503919454814208141"
}

---

{
  "action": "fetch",
  "channel": "discord",
  "url": "https://discord.com/channels/1285.../1503.../1503..."
}

---

GET https://discord.com/api/v10/channels/{channelId}/messages/{messageId}
Authorization: Bot <token>
RAW_BUFFERClick to expand / collapse

Summary

Add an action: "fetch" (or get) to the Discord message tool that retrieves one specific message by channelId + messageId, or by parsing a Discord message URL (https://discord.com/channels/{guildId}/{channelId}/{messageId}).

Motivation

Today the agent can only:

  • read — list recent N messages from a channel
  • search — keyword search across a guild

There is no way to fetch a specific message by ID. This is a frequent need:

  • A user pastes a Discord message link in chat ("見て、これ") — the agent currently has to reply "リンク踏んでも中身見えない、コピペして" which is bad UX.
  • Cross-thread / cross-channel referencing (quoting a decision from another channel).
  • Following up on a reply_to_id that is older than the agent's read window.

Related: #59895 added read for session-boot history, but doesn't cover pinpoint fetch. #17207 covers the inbound side (exposing the triggering messageId).

Proposed API

{
  "action": "fetch",
  "channel": "discord",
  "channelId": "1503919293882957906",
  "messageId": "1503919454814208141"
}

Or by URL (convenience):

{
  "action": "fetch",
  "channel": "discord",
  "url": "https://discord.com/channels/1285.../1503.../1503..."
}

Returns the message object (content, author, attachments, embeds, timestamp, reference, etc.).

Validated with curl

The underlying Discord REST endpoint works fine with the existing bot token + Read Message History perm:

GET https://discord.com/api/v10/channels/{channelId}/messages/{messageId}
Authorization: Bot <token>

Returns full message payload. So this is purely a tool-surface gap, not a permissions/protocol problem.

Constraints / Notes

  • Honor existing channels.discord.actions.* gating.
  • Bot must be in the guild and have read access to the channel.
  • DMs: only the bot's own DMs are fetchable (same as Discord API behavior — document, don't block).
  • Should probably reuse the same return shape as read so consumers don't fork code paths.

Out of scope

  • Bulk fetch by ID list (could be a follow-up).
  • Cross-guild fetch where bot is not a member (impossible at the API layer).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING