#update caused discord to disconnect
1 messages · Page 1 of 1 (latest)
First thing: what does openclaw --version show now?
For Discord disconnects after an update, the fastest checks are:
openclaw status
openclaw gateway status
openclaw channels status --probe
openclaw logs --follow
Please paste the Discord-related lines from openclaw channels status --probe and the first Discord error from logs. Don’t paste your bot token.
Two common post-update causes:
- the gateway service restarted without
DISCORD_BOT_TOKENin its env /~/.openclaw/.env - the bot token/config is fine, but the gateway just needs a clean restart after the update
Discord docs: https://docs.openclaw.ai/channels/discord
Channel troubleshooting ladder: https://docs.openclaw.ai/channels/troubleshooting
user@server:~$ openclaw plugins install @openclaw/discord
Invalid config at ~/.openclaw/openclaw.json:
- channels.discord.streaming: invalid config: must be object
🦞 OpenClaw 2026.5.7
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- channels.discord.streaming: invalid config: must be object
Run: openclaw doctor --fix
Config invalid outside the plugin recovery path for discord; run `openclaw doctor --fix` before reinstalling it.
user@server:~$
Yep, this is a config migration issue, not a Discord token problem.
In current OpenClaw, channels.discord.streaming must be an object, e.g.:
streaming: { mode: "off" }
// or
streaming: { mode: "partial" }
Older configs could have streaming: true, streaming: false, or streaming: "partial", and 2026.5.7 is rejecting that before the Discord plugin recovery path runs.
Do this first:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
openclaw doctor --fix
openclaw gateway restart
openclaw channels status --probe
If doctor --fix works, no need to reinstall Discord. Discord is bundled/supported; the install command is getting blocked only because the config is invalid.
If doctor does not fix it, manually edit ~/.openclaw/openclaw.json and change the bad Discord streaming value:
// old
streaming: true
// new
streaming: { mode: "partial" }
or if it was disabled:
streaming: { mode: "off" }
Then restart and probe again:
openclaw gateway restart
openclaw channels status --probe
user@server:~$ cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
user@server:~$ openclaw doctor --fix
Invalid config at ~/.openclaw/openclaw.json:
- channels.discord.streaming: invalid config: must be object
🦞 OpenClaw 2026.5.7
Config invalid; doctor will run with best-effort config.
[openai-codex] Token refresh failed: 401
{
"error": {
"message": "Refresh token expired or invalid.",
"type": "invalid_request_error",
"code": "refresh_token_reused"
}
}
Model auth:
- provider: expired — re-authentication required
Gateway:
- Runtime: stopped
- Service loaded but not running
- Local gateway target configured
Restarted systemd service: openclaw-gateway.service
Invalid config:
- channels.discord.streaming: invalid config: must be object
Doctor complete.
user@server:~$
:::
Doctor didn’t migrate it, so manually fix that one field.
Open the config:
nano ~/.openclaw/openclaw.json
Find the Discord block and look for streaming. It’s probably one of these:
streaming: true
streaming: false
streaming: "partial"
streaming: "off"
Change it to an object:
streaming: { mode: "partial" }
or, safest if you don’t care about streamed Discord previews:
streaming: { mode: "off" }
Then run:
openclaw status
openclaw gateway restart
openclaw channels status --probe
The OpenAI/Codex refresh_token_reused is separate from Discord — after the config validates, re-auth your model provider with the normal auth/configure flow. But the gateway won’t be happy until the invalid channels.discord.streaming value is fixed first.
{
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "[REDACTED]"
},
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send"
]
}
}
That snippet is only the gateway config — it doesn’t include the channels.discord section where the bad value is.
Run this to find the exact line:
grep -n -C 5 'streaming' ~/.openclaw/openclaw.json
You’re looking for something under channels.discord, like:
"streaming": true
Change just that value to:
"streaming": { "mode": "off" }
Then:
openclaw status
openclaw gateway restart
openclaw channels status --probe
If you paste the grep -n -C 5 'streaming' ... output here, redact tokens and I’ll point to the exact edit.
user@server:~$ nano ~/.openclaw/openclaw.json
user@server:~$ grep -n -C 5 'streaming' ~/.openclaw/openclaw.json
84- "telegram": {
85- "enabled": true,
86- "dmPolicy": "pairing",
87- "botToken": "[REDACTED]",
88- "groupPolicy": "allowlist",
89: "streaming": {
90- "mode": "partial"
91- }
92- },
93- "discord": {
94- "enabled": true,
95- "token": "[REDACTED]",
96- "groupPolicy": "allowlist",
97: "streaming": "off",
98- "guilds": {
99- "[REDACTED_GUILD_ID]": {
100- "requireMention": false
101- }
102- }
user@server:~$
Found it — line 97 is the bad value:
"streaming": "off",
Change it to:
"streaming": { "mode": "off" },
So that Discord block should look like:
"discord": {
"enabled": true,
"token": "[REDACTED]",
"groupPolicy": "allowlist",
"streaming": { "mode": "off" },
"guilds": {
"[REDACTED_GUILD_ID]": {
"requireMention": false
}
}
}
Then run:
openclaw status
openclaw gateway restart
openclaw channels status --probe
If that passes, Discord should reconnect. The Codex auth error from doctor is separate and can be handled after this.
please give me a command to change this
Yep — use this exact command:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak && python3 - <<'PY'
import json
from pathlib import Path
p = Path.home() / ".openclaw" / "openclaw.json"
data = json.loads(p.read_text())
data.setdefault("channels", {}).setdefault("discord", {})["streaming"] = {"mode": "off"}
p.write_text(json.dumps(data, indent=2) + "
")
PY
openclaw gateway restart
openclaw channels status --probe
That backs up the config, changes only channels.discord.streaming to the new object format, restarts the gateway, then probes channels.
user@server:~$ cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak && python3 - <<'PY'
import json
from pathlib import Path
p = Path.home() / ".openclaw" / "openclaw.json"
data = json.loads(p.read_text())
data.setdefault("channels", {}).setdefault("discord", {})["streaming"] = {"mode": "off"}
p.write_text(json.dumps(data, indent=2) + "\n")
PY
openclaw gateway restart
openclaw channels status --probe
File "<stdin>", line 7
p.write_text(json.dumps(data, indent=2) + "
^
SyntaxError: unterminated string literal (detected at line 7)
Invalid config at ~/.openclaw/openclaw.json:
- channels.discord.streaming: invalid config: must be object
🦞 OpenClaw 2026.5.7
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- channels.discord.streaming: invalid config: must be object
Run: openclaw doctor --fix
Gateway aborted: config is invalid.
channels.discord.streaming: invalid config: must be object
Fix the config and retry, or run "openclaw doctor" to repair.
user@server:~$
Ah, Discord ate the escaping in that pasted heredoc. Use this one-liner instead — no multiline Python string:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak && python3 -c 'import json,pathlib; p=pathlib.Path.home()/".openclaw"/"openclaw.json"; data=json.loads(p.read_text()); data["channels"]["discord"]["streaming"]={"mode":"off"}; p.write_text(json.dumps(data, indent=2))'
Then:
openclaw gateway restart
openclaw channels status --probe
If that still complains, run: