openclaw - 💡(How to fix) Fix Discord plugin WebSocket hangs at "awaiting gateway readiness"

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…

The OpenClaw Discord plugin's WebSocket client never transitions from awaiting gateway readiness to READY. The REST API works fine (bot probe, channel resolution), but the bot never comes online in Discord.

Error Message

No error messages. The only Discord entries after startup are:

[discord] [default] starting provider
[gateway] ready
[heartbeat] started
[discord] [default] Discord bot probe resolved @Chang
[discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[discord] channels resolved: ...
[discord] client initialized as 1504865841278357584; awaiting gateway readiness

Root Cause

The OpenClaw Discord plugin's WebSocket client never transitions from awaiting gateway readiness to READY. The REST API works fine (bot probe, channel resolution), but the bot never comes online in Discord.

Fix Action

Fix / Workaround

Suspected cause

Possible incompatibility between the bundled discord.js client and Node.js v24, or a stale session handling bug where the client silently fails to receive/process the READY dispatch.

Code Example

[discord] [default] Discord bot probe resolved @Chang
[discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[discord] channels resolved: 1066509334042919023/1504864729926078576 (guild:Util; channel:main), ...
[discord] client initialized as 1504865841278357584; awaiting gateway readiness

---

[discord] [default] starting provider
[gateway] ready
[heartbeat] started
[discord] [default] Discord bot probe resolved @Chang
[discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[discord] channels resolved: ...
[discord] client initialized as 1504865841278357584; awaiting gateway readiness
RAW_BUFFERClick to expand / collapse

Discord plugin WebSocket hangs at "awaiting gateway readiness"

Summary

The OpenClaw Discord plugin's WebSocket client never transitions from awaiting gateway readiness to READY. The REST API works fine (bot probe, channel resolution), but the bot never comes online in Discord.

Environment

  • OpenClaw version: 2026.5.12
  • Discord plugin version: 2026.5.12
  • Node.js: v24.14.0
  • OS: WSL2 Ubuntu
  • Bot: @Chang (id: 1504865841278357584)

Steps to reproduce

  1. Configure Discord channel with DISCORD_BOT_TOKEN in .env
  2. Start gateway: systemctl --user start openclaw-gateway.service
  3. Observe logs: REST calls succeed, then WebSocket hangs indefinitely

Expected behavior

WebSocket should connect and bot should appear online in Discord within ~10 seconds.

Actual behavior

[discord] [default] Discord bot probe resolved @Chang
[discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[discord] channels resolved: 1066509334042919023/1504864729926078576 (guild:Util; channel:main), ...
[discord] client initialized as 1504865841278357584; awaiting gateway readiness

Then silence. The line "awaiting gateway readiness" is the last Discord-related log entry. No errors, no timeouts, no retries.

What I've verified

  • ✅ Discord token is valid (verified via GET /users/@me)
  • ✅ All intents enabled in Developer Portal (Message Content, Server Members, Presence)
  • ✅ REST API works: bot probe, channel resolution
  • ✅ Manual WebSocket handshake to wss://gateway.discord.gg succeeds
  • ✅ Token regenerated (new token didn't fix it)
  • ✅ Plugin reinstalled (npm install @openclaw/discord@latest)
  • ✅ Discord cache/state cleared (rm -rf ~/.openclaw/discord)
  • ✅ Rate limit wait (2+ minutes between restarts)
  • ✅ No 4006 or other close codes in logs — just silence
  • ✅ Multiple gateway restarts (14 starts today) — same behavior every time

Logs

No error messages. The only Discord entries after startup are:

[discord] [default] starting provider
[gateway] ready
[heartbeat] started
[discord] [default] Discord bot probe resolved @Chang
[discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[discord] channels resolved: ...
[discord] client initialized as 1504865841278357584; awaiting gateway readiness

Suspected cause

Possible incompatibility between the bundled discord.js client and Node.js v24, or a stale session handling bug where the client silently fails to receive/process the READY dispatch.

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…

FAQ

Expected behavior

WebSocket should connect and bot should appear online in Discord within ~10 seconds.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Discord plugin WebSocket hangs at "awaiting gateway readiness"