Summary
opencli discord-app read returns an empty Message field for embed-only messages (bot cards such as macro-news digest bots), while Author, Time, channel_id, and message_id are all populated correctly.
Adapter
- Site:
discord-app
- Command:
read
- OpenCLI version:
1.8.6
Original failure
- Error code: none — command exits 0 with
EMPTY message text
[
{
"Author": "黄金蛙🐸APP",
"Time": "2026-08-14T16:01:24.926Z",
"Message": "",
"channel_id": "1398004432406450248",
"message_id": "1537853661856923669"
}
]
The rendered message is a bot embed card with visible text ("24小时重要宏观事件…"), so the data is on screen but not captured.
Root cause
buildReadMessagesScript() in clis/discord-app/utils.js extracts text only from [id^="message-content-"], [class*="messageContent"]. For embed-only messages that element exists but is empty — the actual text lives in [class*="embedWrapper"] / article[class*="embed"].
Local fix summary
In the per-node loop: read textOf(contentEl) first; if empty, fall back to node.querySelector('[class*="embedWrapper"], article[class*="embed"]') and use its text for Message (keep dedup key and gating unchanged). Verified locally: plain-text channels and embed-only channels both return correct text; servers/channels/status unaffected.
Environment
- opencli 1.8.6, Node 22.x, Debian 13 (trixie), headless Xvfb
- Discord Desktop 1.0.153 (Electron 42.7.1, Chrome/148)
Issue filed after a verified local repair.
Summary
opencli discord-app readreturns an emptyMessagefield for embed-only messages (bot cards such as macro-news digest bots), whileAuthor,Time,channel_id, andmessage_idare all populated correctly.Adapter
discord-appread1.8.6Original failure
EMPTYmessage textThe rendered message is a bot embed card with visible text ("24小时重要宏观事件…"), so the data is on screen but not captured.
Root cause
buildReadMessagesScript()inclis/discord-app/utils.jsextracts text only from[id^="message-content-"], [class*="messageContent"]. For embed-only messages that element exists but is empty — the actual text lives in[class*="embedWrapper"]/article[class*="embed"].Local fix summary
In the per-node loop: read
textOf(contentEl)first; if empty, fall back tonode.querySelector('[class*="embedWrapper"], article[class*="embed"]')and use its text forMessage(keep dedup key and gating unchanged). Verified locally: plain-text channels and embed-only channels both return correct text;servers/channels/statusunaffected.Environment
Issue filed after a verified local repair.