← Back to library

Discord 只收 slash 不收普通消息:MESSAGE_CREATE 事件链路排障清单

场景:Discord bot 在线且 slash command 正常,但普通消息无响应。前置:已开 Message Content intent,bot 有读写权限。步骤:先确认连接和 guild 解析,再开 trace 验证 MESSAGE_CREATE,再检查 requireMention/groupPolicy。关键检查:`openclaw doctor` 与 `status --deep`。验证:普通频道消息能触发会话与回复。风险:误把问题归因为 token 导致反复重建 bot。

GITHUBDiscovered 2026-02-15Author worldcash1
Prerequisites
  • Discord portal intents are enabled (including Message Content) and bot has channel read/send permissions.
  • You can run OpenClaw diagnostics and inspect trace logs.
Steps
  1. Verify baseline health: bot login success, guild resolved, outbound send path is working.
  2. Run deep diagnostics (`doctor`/`status --deep`) and confirm channel state is not degraded.
  3. Enable trace logging and check whether `MESSAGE_CREATE` events appear at all.
  4. Review Discord config (`requireMention`, `groupPolicy`) and retest with plain text messages.
  5. If still failing, perform clean restart and retest before recreating bot credentials.
Commands
openclaw doctor --non-interactive
openclaw status --deep
openclaw gateway restart
Verify

Non-slash messages produce MESSAGE_CREATE traces and the bot replies in-channel consistently.

Caveats
  • Do not rotate tokens early; missing gateway events are often config/event-path issues.
  • Discord gateway behavior can differ by shard/region and runtime versions(需验证).
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post