#Bot won't reply inside server, not even in general chat but can respond in DM.
1 messages Β· Page 1 of 1 (latest)
If DM works, the token and pairing are probably fine. The usual problem is guild gating, not Discord permissions.
Most likely causes:
Message Content Intentis off, or it was enabled after startup and the gateway was not restarted.- The server is not allowlisted under
channels.discord.guilds. requireMentionis still in effect, so it stays silent unless you @mention the bot.- You set
users/roles/channelsin the guild config and your account or channel does not match.
Important: giving the bot a Discord role is not enough by itself. OpenClaw still needs the guild config.
Minimal working config shape:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false,
users: ["YOUR_USER_ID"]
}
}
}
}
}
Please paste these:
openclaw --version
openclaw channels status --probe
And if possible, run:
openclaw logs --follow
then send one test message in the server and paste the new log lines.
Docs:
https://docs.openclaw.ai/channels/discord
https://docs.openclaw.ai/channels/troubleshooting
If you paste your redacted channels.discord config, I can tell you exactly what is blocking it.
"channels": {
"discord": {
"enabled": true,
"token": "",
"groupPolicy": "allowlist",
"guilds": {
"": {
"requireMention": false,
"channels": {
"": {
"allow": true
"users": ""
}
}
}
}
}
},
Like this?
C:\Users\marka>openclaw --version
OpenClaw 2026.4.14 (323493f)
Close, but a few important fixes:
- Do not paste your real bot token in chat. If you use
DISCORD_BOT_TOKEN, just omittokeninstead of setting it to"". - The guild key must be your server ID
usersmust be an array, and it belongs under the guild, not inside the channel block- Use
enabled: truefor channel entries,allow: trueis legacy - Your snippet is also missing a few commas/braces
Iβd use this first, it allows the whole server:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false,
users: ["YOUR_USER_ID"]
}
}
}
}
}
If you want to allow only one channel:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false,
users: ["YOUR_USER_ID"],
channels: {
"YOUR_CHANNEL_ID": { enabled: true }
}
}
}
}
}
}
A couple gotchas:
- If you add a
channelsblock, only those channels will work - If you want role-based allowlisting instead, use
roles: ["ROLE_ID"] - After changing config, restart the gateway
If you already used allow: true, run:
openclaw doctor --fix
Docs: https://docs.openclaw.ai/channels/discord
If you want, paste it again with the IDs filled in and token redacted, and Iβll sanity-check it.
Nice, that version looks fine, so this probably is config/policy, not a broken release.
Next, please paste:
openclaw channels status --probe
And also your current redacted channels.discord block after the edits.
One important thing before testing again:
- make sure Message Content Intent is enabled in the Discord developer portal
- then restart the gateway once
If you want, run this too while sending one test message in the server:
openclaw logs --follow
and paste the new Discord-related lines. That usually shows whether itβs being blocked by:
- guild allowlist
- channel allowlist
- user/role allowlist
- mention gating
C:\Users\marka>openclaw channels status --probe
π¦ OpenClaw 2026.4.14 (323493f)
I'm like tmux: confusing at first, then suddenly you can't live without me.
|
o
Gateway reachable.
- Discord default: enabled, configured, running, connected, bot:@MindTrap Bot, token:env, intents:content=limited, works
Tip: status --deep adds gateway health probes to status output (requires a reachable gateway).
C:\Users\marka>
Yep, thatβs the clue.
intents:content=limited means Discord is not giving the bot full guild message content right now. That matches your symptom almost perfectly: DMs work, server messages donβt.
What to do:
- Go to Discord Developer Portal β Your App β Bot
- Under Privileged Gateway Intents, enable Message Content Intent
- If you plan to use
roles, also enable Server Members Intent - Save, then restart the OpenClaw gateway
- Run this again:
openclaw channels status --probe
What you want is for that intents:content=limited part to disappear.
So right now Iβd focus on that first. Your allowlist config may still need cleanup, but this is definitely one blocker.
If it still says limited after enabling it, paste:
- a screenshot/text of the Bot intent settings
- your current redacted
channels.discordblock
But those were enabled already
Got it, thanks. If those were already enabled, then content=limited is probably not the real blocker here, it can be normal for smaller bots.
Since:
- DM works
- probe says Discord is connected and
works
β¦the next most likely issue is the guild allowlist config.
For a clean sanity test, strip it down to the simplest possible config first:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false
}
}
}
}
}
A few important notes:
- use your server ID there, not the channel ID
- if you add
channels,users, orroles, any wrong value there can block replies - a Discord server role does nothing by itself unless you also put that role ID in
roles: ["ROLE_ID"] - if your token comes from env, just omit
token
Then:
- save config
- restart gateway
- test again in the server
If itβs still silent, please paste:
- your current redacted
channels.discordblock - the output from
openclaw logs --followright after sending one test message in the server
That should show exactly whether itβs rejecting the guild, channel, sender, or mention policy.
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ OPENCLAW π¦
23:11:51+00:00 info gateway {"subsystem":"gateway"} starting HTTP server...
23:11:51+00:00 info gateway/canvas {"subsystem":"gateway/canvas"} canvas host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root C:\Users\marka.openclaw\canvas)
23:11:51+00:00 info gateway/health-monitor {"subsystem":"gateway/health-monitor"} started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
23:11:51+00:00 info gateway {"subsystem":"gateway"} agent model: ollama/gemma4
23:11:51+00:00 info gateway {"subsystem":"gateway"} ready (2 plugins: discord, openclaw-web-search; 34.7s)
23:11:51+00:00 info gateway {"subsystem":"gateway"} log file: C:\Users\marka\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
23:11:52+00:00 info gateway {"subsystem":"gateway"} starting channels and sideca
These are just the startup logs, so we still canβt see what happens when a server message arrives.
Next step:
- Keep this running:
openclaw logs --follow
- Then in your Discord server send:
- one message mentioning the bot, like
@MindTrap Bot test - one plain message without mention
- Paste only the new lines that appear after those tests
If nothing new appears at all, tell me that too, thatβs useful.
Also, please paste your current redacted channels.discord block. We still need that, because right now the most likely causes are:
- wrong server ID in
guilds - a restrictive
users/roles/channelsentry requireMentionor allowlist set in the wrong place
Once I have the post-message log lines plus the config block, I should be able to tell you exactly which one it is.
nothing came up on the log after i restarted the gateway and chatted in my discord server where the only user is me, and the bot.
That helps a lot.
If nothing appeared after a server message, letβs remove the config complexity and do one clean test.
Use this exact minimal Discord block, with your real server ID:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false
}
}
}
}
}
Important:
- no
users - no
roles - no
channels - if your token is from env, omit
token
Then run:
openclaw doctor --fix
openclaw gateway restart
After that, test with an actual mention first:
@MindTrap Bot test
Two key questions:
- Does the bot reply to the @mention?
- Does
openclaw logs --followshow anything for that @mention?
If the answer is still no / nothing, then we can stop blaming allowlists and focus on Discord event delivery.
If the mention works but plain chat does not, then itβs still a message content / mention gating issue.
Also, double-check one easy mistake: the key under guilds must be the server ID, not the channel ID.
Where would i put the token if i were to remove it?
If channels status --probe says token:env, youβre already doing it the right way π
So:
- remove the
tokenfield from the JSON - keep the token in the environment, not in the config file
On Windows CMD for the current terminal session:
set DISCORD_BOT_TOKEN=YOUR_REAL_TOKEN
openclaw gateway
If you want it to persist across new terminals:
setx DISCORD_BOT_TOKEN "YOUR_REAL_TOKEN"
Then close/reopen the terminal and restart OpenClaw.
If you want to bind config to that env var explicitly, run once:
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
So the short answer is: donβt put the token in that JSON block at all.
And definitely donβt paste the real token here. Docs: https://docs.openclaw.ai/channels/discord
19:23:05 [ws] β res β channels.status 1761ms conn=6d86c981β¦1ebe id=dc204ceeβ¦2d93
19:23:09 [ws] β res β doctor.memory.status 4548ms conn=01290346β¦9b48 id=9bd1d2b6β¦2bfa
19:23:10 [discord] client initialized as 1493889044789071973 (MindTrap Bot); awaiting gateway readiness
19:28:54 [ws] handshake timeout conn=84bfff62-da46-4b81-8e1e-e9df2652a25b peer=127.0.0.1:59524->127.0.0.1:18789 remote=127.0.0.1
19:28:54 [ws] closed before connect conn=84bfff62-da46-4b81-8e1e-e9df2652a25b peer=127.0.0.1:59524->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1000 reason=n/a
Does this matter?
Not really, those lines are probably not the main problem.
What they mean:
client initialized ... awaiting gateway readiness= normal Discord startupws handshake timeout ... 127.0.0.1= a local WebSocket to your own gateway/dashboard, not Discord guild traffic
So I would not chase those yet.
The more important signal is still this:
channels status --probesays Discord is connected- DMs work
- guild messages still do not
That still points more toward guild config / gating than a broken gateway.
At this point, Iβd do the simplest possible test config, exactly like this:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false
}
}
}
}
}
Then:
openclaw doctor --fix
openclaw gateway restart
Then test:
@MindTrap Bot test
If you want, paste your current full redacted channels.discord block and Iβll check it line by line. Thatβs honestly the fastest way from here.
{
"channels": {
"discord": {
"enabled": true,
"groupPolicy": "allowlist",
"guilds": {
"": {
"requireMention": false
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "local-dev"
}
},
"models": {
"providers": {
"ollama": {
"api": "ollama",
"baseUrl": "http://127.0.0.1:11434"
}
}
}
}
19:41:34 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=Tony (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
19:41:34 [model-pricing] pricing bootstrap failed: TimeoutError: The operation was aborted due to timeout
19:41:44 [heartbeat] started
19:41:45 [bonjour] restarting advertiser (service stuck in announcing for 11098ms (gateway fqdn=Tony (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
Yep, thatβs the blocker.
Right now you have:
"guilds": {
"": {
"requireMention": false
}
}
With groupPolicy: "allowlist", that means no guild is actually allowlisted, so the bot will stay silent in servers.
Use your server ID there, not the channel ID.
Example:
{
channels: {
discord: {
enabled: true,
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: false
}
}
}
},
gateway: {
mode: "local",
auth: {
mode: "token",
token: "local-dev"
}
},
models: {
providers: {
ollama: {
api: "ollama",
baseUrl: "http://127.0.0.1:11434"
}
}
}
}
Then:
openclaw gateway restart
And test again in the server.
Two important notes:
- server ID, not channel ID
- donβt leave the guild key as
""
Also, you pasted your gateway.auth.token publicly. Since this is a support thread, Iβd rotate it afterward just to be safe, even if youβre only using local mode.
Nope, those are unrelated.
bonjour ... re-advertise= local network discoverymodel-pricing ... timeout= pricing fetch, not Discord messagingheartbeat started= normal
They do not explain why the bot is silent in your server.
The real blocker we found is still this:
"guilds": {
"": {
That empty key means no server is allowlisted.
So the next move is still:
- replace
""with your actual server ID - restart the gateway
- test again in the server
If it still does not reply after that change, paste:
- the updated
channels.discordblock - fresh output from
openclaw channels status --probe
Iβm pretty confident the empty guild ID is the main issue here.
i only redacted the guild id there but i actually have it in the json
Ah, got it, thanks, that changes things.
And yeah, for redaction, use placeholders like SERVER_ID instead of "", otherwise it looks like the value is actually missing.
At this point, the fastest next step is:
- Paste the entire
channels.discordblock again - Replace secrets/IDs like this:
SERVER_IDCHANNEL_IDUSER_IDROLE_ID
I specifically need to see whether you still have any hidden:
channelsusersroles
because any of those can silently block guild replies.
Also, one very important check:
- does
@MindTrap Bot testfail too? - or is it only failing on normal non-mention messages?
That distinction matters a lot.
So, please send:
- the full redacted
channels.discordblock, with placeholders not blanks - whether a direct @mention works or not
i removed channels, roles, and users just like you suggested.
Good, then the next thing I want to rule out is config-path mismatch.
On Windows this happens a lot: you edit one openclaw.json, but the running gateway/service is using a different one.
Please run these:
openclaw gateway status
openclaw config get channels.discord
And paste:
Config (cli)Config (service)Probe targetListening- the output of
openclaw config get channels.discord
If Config (cli) and Config (service) are different, thatβs the issue.
The docs call this out directly: https://docs.openclaw.ai/help/faq#why-does-openclaw-gateway-status-show-config-cli-and-config-service-different
Also, please confirm one thing very explicitly:
- does
@MindTrap Bot testfail too, or only plain messages?
PS C:\Users\marka> openclaw gateway restart
π¦ OpenClaw 2026.4.14 (323493f) β Your .zshrc wishes it could do what I do.
Restarted Windows login item: OpenClaw Gateway
PS C:\Users\marka> openclaw gateway restart
π¦ OpenClaw 2026.4.14 (323493f) β I'll refactor your busywork like it owes me money.
Restarted Windows login item: OpenClaw Gateway
PS C:\Users\marka> openclaw gateway status
π¦ OpenClaw 2026.4.14 (323493f)
Gateway onlineβplease keep hands, feet, and appendages inside the shell at all times.
β
β
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Command: C:\Program Files\nodejs\node.exe C:\Users\marka\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 21724, Startup-folder login item installed; listener detected on port 18789.)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
PS C:\Users\marka> openclaw config get channels.discord
π¦ OpenClaw 2026.4.14 (323493f)
One CLI to rule them all, and one more restart because you changed the port.
{
"enabled": true,
"groupPolicy": "allowlist"
}
PS C:\Users\marka>
Yep, thatβs the smoking gun.
openclaw config get channels.discord is showing:
{
"enabled": true,
"groupPolicy": "allowlist"
}
There is no guilds block at all in the effective config.
With groupPolicy: "allowlist", that means all guild messages are blocked.
So OpenClaw is currently doing exactly what the loaded config says.
The easiest fix is to set it via CLI so JSON syntax doesnβt bite you:
openclaw config set channels.discord.guilds '{"YOUR_SERVER_ID":{"requireMention":false}}' --strict-json
openclaw gateway restart
openclaw config get channels.discord
After that, openclaw config get channels.discord should show something like:
{
"enabled": true,
"groupPolicy": "allowlist",
"guilds": {
"YOUR_SERVER_ID": {
"requireMention": false
}
}
}
Then test again in the server.
So yeah, we found it, the gateway is not seeing any guild allowlist in the actual loaded config.
Error: Failed to parse JSON value: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
Yep, that was the JSON blob tripping over shell quoting.
Letβs avoid that entirely and set the leaf value instead. In PowerShell, run this with your real server ID:
openclaw config set 'channels.discord.guilds["YOUR_SERVER_ID"].requireMention' false --strict-json
openclaw config get channels.discord
openclaw gateway restart
That should make config get show a guilds block.
Why this is better:
- no big JSON string
- no escaping mess
- much harder for PowerShell to mangle
If it works, you should see something like:
{
"enabled": true,
"groupPolicy": "allowlist",
"guilds": {
"YOUR_SERVER_ID": {
"requireMention": false
}
}
}
If it still errors, paste the exact command you ran and Iβll fix the quoting.
PS C:\Users\marka> openclaw gateway status --deep
π¦ OpenClaw 2026.4.14 (323493f) β More integrations than your therapist's intake form.
β
β
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Command: C:\Program Files\nodejs\node.exe C:\Users\marka\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 3216, Startup-folder login item installed; listener detected on port 18789.)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
PS C:\Users\marka> openclaw channels --status
error: unknown option '--status'
PS C:\Users\marka> openclaw channels status
π¦ OpenClaw 2026.4.14 (323493f) β I'm not AI-powered, I'm AI-possessed. Big difference.
β
β
Gateway reachable.
- Discord default: enabled, not configured, stopped, disconnected, error:not configured
Tip: status --deep adds gateway health probes to status output (requires a reachable gateway).
π¦ OpenClaw 2026.4.14 (323493f) β Running on your hardware, reading your logs, judging nothing (mostly).
β
β
20:16:02 [gateway] loading configurationβ¦
20:16:03 [gateway] resolving authenticationβ¦
20:16:04 [gateway] starting...
20:16:35 [gateway] starting HTTP server...
20:16:35 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root C:\Users\marka.openclaw\canvas)
20:16:35 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
20:16:35 [gateway] agent model: ollama/gemma4
20:16:35 [gateway] ready (2 plugins: discord, openclaw-web-search; 31.9s)
20:16:35 [gateway] log file: C:\Users\marka\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
20:16:36 [gateway] starting channels and sidecars...
20:16:36 [hooks] loaded 4 internal hook handlers
20:17:05 [model-pricing] pricing bootstrap failed: TimeoutError: The operation was aborted due to timeout
20:17:15 [heartbeat] started
20:20:58 [ws] β res β channels.status 442ms conn=0e80b48eβ¦9e5b id=1528e8b2β¦0c72
Yep, this is the real issue now.
This line is the giveaway:
- Discord default: enabled, not configured, stopped, disconnected, error:not configured
That means the running gateway cannot see a Discord token at all.
Since youβre running OpenClaw as a Windows Scheduled Task, a token that only exists in your current shell usually wonβt reach the service. Your gateway status also showed:
Service env: OPENCLAW_GATEWAY_PORT=18789
No DISCORD_BOT_TOKEN there.
Fix
- Put the bot token in:
C:\Users\marka\.openclaw\.env
with this line:
DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
- Point config at that env var:
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
- Add the guild allowlist entry if it still isnβt present:
openclaw config set 'channels.discord.guilds["YOUR_SERVER_ID"].requireMention' false --strict-json
- Restart the gateway:
openclaw gateway restart
- Verify:
openclaw channels status --probe
openclaw config get channels.discord
What you want to see:
configured, running, connected- and a
guildsblock inconfig get
Also, donβt paste the real token here. Docs note that daemons read env vars from ~/.openclaw/.env or the service environment.
This still looks like Discord never started.
What Iβd expect to see if the token was loading is something like a Discord startup line, for example:
[discord] client initialized ...
But your log only shows the gateway starting, not the Discord client.
So I think the token is still not being picked up.
Please run these after adding C:\Users\marka\.openclaw\.env and restarting:
openclaw channels status --probe
openclaw config get channels.discord
If it still says:
not configured
then check these very carefully:
- The file is exactly:
C:\Users\marka\.openclaw\.env
- The contents are exactly:
DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
-
No quotes, no extra spaces, no
.txtextension -
You ran:
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
openclaw gateway restart
Paste the output of those 2 commands and weβll know immediately whether the token is finally loading.
PS C:\Users\marka> openclaw gateway status --deep
π¦ OpenClaw 2026.4.14 (323493f)
One CLI to rule them all, and one more restart because you changed the port.
β
β
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Command: C:\Program Files\nodejs\node.exe C:\Users\marka\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (Startup-folder login item installed; no listener detected on port 18789.)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):
Service is loaded but not running (likely exited immediately).
File logs: C:\Users\marka\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Okay, this is useful, the problem has shifted.
Right now the gateway is crashing on startup, so Discord never even gets a chance to connect.
Most likely causes at this point:
- malformed
openclaw.json - bad config path/value from one of the
config setcommands - bad token/env reference
Please run these next:
openclaw config validate
Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-2026-04-16.log" -Tail 120
Paste both outputs.
That will usually show the exact startup error, and then we can fix the real crash instead of guessing.
PS C:\Users\marka> openclaw gateway status --deep
π¦ OpenClaw 2026.4.14 (323493f)
If it works, it's automation; if it breaks, it's a "learning opportunity."
β
β
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Command: C:\Program Files\nodejs\node.exe C:\Users\marka\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (Startup-folder login item installed; no listener detected on port 18789.)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):
Service is loaded but not running (likely exited immediately).
File logs: C:\Users\marka\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
the gateway terminal crashes whenever i restart it.
Yeah, thatβs frustrating, but at least weβve narrowed it down, this is now a startup crash, not a Discord permissions problem.
gateway status is only telling us that it dies, not why.
Please run these exact commands and paste the output:
openclaw config validate
Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-2026-04-16.log" -Tail 120
If that still doesnβt show the error clearly, run the gateway in the foreground once:
openclaw gateway
and paste the first error it prints before exiting.
That should give us the actual crash reason, likely:
- broken
openclaw.json - bad
channels.discord.tokenconfig - bad
guildspath/edit
Weβre close, we just need the real error line now.
the result is too long, but what am i looking for after i ran this:
openclaw config validate
Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-2026-04-16.log" -Tail 120
Youβre looking for the first real failure line, not the whole output.
In openclaw config validate
Look for lines containing any of these:
errorinvalidfaileddiscordtokenguildsopenclaw.json
In the log tail
Look for lines containing:
errorfatalSyntaxError
Failed to parsediscordtokenguildsopenclaw.json
If you want to shrink the output, run these:
openclaw config validate 2>&1 | Select-String 'error|invalid|failed|discord|token|guilds|openclaw.json'
Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-2026-04-16.log" -Tail 120 | Select-String 'error|fatal|SyntaxError|Failed to parse|discord|token|guilds|openclaw.json'
Then paste just those matching lines.
If there are no matches, tell me that too.
i found something that discord bot token is missing or empty, there was no .env file in the path you gave so I created one and i put the token there after =
Nice, thatβs probably the root cause π―
If the error said the Discord bot token was missing/empty, and there was no .env before, then creating:
C:\Users\marka\.openclaw\.env
with:
DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
was the right move.
Now do these 4 steps:
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
openclaw config set 'channels.discord.guilds["YOUR_SERVER_ID"].requireMention' false --strict-json
openclaw gateway restart
openclaw channels status --probe
What you want to see after that is something like:
configuredrunningconnected
Two tiny gotchas:
- make sure the file is really named
.env, not.env.txt - no quotes or extra spaces around the token
If you paste the new openclaw channels status --probe output, I can tell you immediately if itβs fixed.
DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
How should this look like?
DISCORD_BOT_TOKEN="12371892371892379" like that? numbers i put in there is just random
Yep, exactly, but use the actual bot token from the Discord Developer Portal, not just numbers.
Best format is:
DISCORD_BOT_TOKEN=YOUR_ACTUAL_DISCORD_BOT_TOKEN
A few tips:
- no spaces
- no extra text
- no
.txtextension on the file - Iβd avoid quotes unless needed, so preferably:
DISCORD_BOT_TOKEN=MTxxxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxxxx
Discord bot tokens are usually long strings, not just digits.
And very important: donβt paste the real token here. If you accidentally do, rotate it in the Discord Developer Portal.
After saving .env, run:
openclaw gateway restart
openclaw channels status --probe
and paste that output.