#Bot won't reply inside server, not even in general chat but can respond in DM.

1 messages Β· Page 1 of 1 (latest)

muted creek
#

Configured and permissions given, role given, integrated in the discord server.

reef widgetBOT
round meadowBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

reef widgetBOT
turbid templeBOT
#

If DM works, the token and pairing are probably fine. The usual problem is guild gating, not Discord permissions.

Most likely causes:

  1. Message Content Intent is off, or it was enabled after startup and the gateway was not restarted.
  2. The server is not allowlisted under channels.discord.guilds.
  3. requireMention is still in effect, so it stays silent unless you @mention the bot.
  4. You set users / roles / channels in 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
muted creek
#

"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)

turbid templeBOT
#

Close, but a few important fixes:

  • Do not paste your real bot token in chat. If you use DISCORD_BOT_TOKEN, just omit token instead of setting it to "".
  • The guild key must be your server ID
  • users must be an array, and it belongs under the guild, not inside the channel block
  • Use enabled: true for channel entries, allow: true is 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 channels block, 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
muted creek
#

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>

turbid templeBOT
#

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:

  1. Go to Discord Developer Portal β†’ Your App β†’ Bot
  2. Under Privileged Gateway Intents, enable Message Content Intent
  3. If you plan to use roles, also enable Server Members Intent
  4. Save, then restart the OpenClaw gateway
  5. 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.

muted creek
#

But those were enabled already

turbid templeBOT
#

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, or roles, 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:

  1. save config
  2. restart gateway
  3. test again in the server

If it’s still silent, please paste:

  • your current redacted channels.discord block
  • the output from openclaw logs --follow right after sending one test message in the server

That should show exactly whether it’s rejecting the guild, channel, sender, or mention policy.

muted creek
#

β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„
β–ˆβ–ˆβ–‘β–„β–„β–„β–‘β–ˆβ–ˆβ–‘β–„β–„β–‘β–ˆβ–ˆβ–‘β–„β–„β–„β–ˆβ–ˆβ–‘β–€β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–‘β–„β–„β–€β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–„β–„β–€β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–‘β–ˆβ–ˆ
β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–‘β–ˆβ–ˆβ–‘β–€β–€β–‘β–ˆβ–ˆβ–‘β–„β–„β–„β–ˆβ–ˆβ–‘β–ˆβ–‘β–ˆβ–‘β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–€β–€β–‘β–ˆβ–ˆβ–‘β–ˆβ–‘β–ˆβ–‘β–ˆβ–ˆ
β–ˆβ–ˆβ–‘β–€β–€β–€β–‘β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–€β–€β–€β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–„β–‘β–ˆβ–ˆβ–‘β–€β–€β–„β–ˆβ–ˆβ–‘β–€β–€β–‘β–ˆβ–‘β–ˆβ–ˆβ–‘β–ˆβ–ˆβ–„β–€β–„β–€β–„β–ˆβ–ˆ
β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€
🦞 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

turbid templeBOT
#

These are just the startup logs, so we still can’t see what happens when a server message arrives.

Next step:

  1. Keep this running:
openclaw logs --follow
  1. Then in your Discord server send:
  • one message mentioning the bot, like @MindTrap Bot test
  • one plain message without mention
  1. 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 / channels entry
  • requireMention or 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.

muted creek
#

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.

turbid templeBOT
#

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:

  1. Does the bot reply to the @mention?
  2. Does openclaw logs --follow show 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.

muted creek
#

Where would i put the token if i were to remove it?

turbid templeBOT
#

If channels status --probe says token:env, you’re already doing it the right way πŸ‘

So:

  • remove the token field 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

muted creek
#

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?

turbid templeBOT
#

Not really, those lines are probably not the main problem.

What they mean:

  • client initialized ... awaiting gateway readiness = normal Discord startup
  • ws 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 --probe says 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.

muted creek
#

{
"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))

turbid templeBOT
#

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 discovery
  • model-pricing ... timeout = pricing fetch, not Discord messaging
  • heartbeat 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:

  1. replace "" with your actual server ID
  2. restart the gateway
  3. test again in the server

If it still does not reply after that change, paste:

  • the updated channels.discord block
  • fresh output from openclaw channels status --probe

I’m pretty confident the empty guild ID is the main issue here.

muted creek
#

i only redacted the guild id there but i actually have it in the json

turbid templeBOT
#

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:

  1. Paste the entire channels.discord block again
  2. Replace secrets/IDs like this:
    • SERVER_ID
    • CHANNEL_ID
    • USER_ID
    • ROLE_ID

I specifically need to see whether you still have any hidden:

  • channels
  • users
  • roles
#

because any of those can silently block guild replies.

Also, one very important check:

  • does @MindTrap Bot test fail too?
  • or is it only failing on normal non-mention messages?

That distinction matters a lot.

So, please send:

  • the full redacted channels.discord block, with placeholders not blanks
  • whether a direct @mention works or not
muted creek
#

i removed channels, roles, and users just like you suggested.

turbid templeBOT
#

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 target
  • Listening
  • the output of openclaw config get channels.discord
muted creek
#

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>

turbid templeBOT
#

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.

muted creek
#

Error: Failed to parse JSON value: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)

turbid templeBOT
#

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.

muted creek
#

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

turbid templeBOT
#

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

  1. Put the bot token in:
C:\Users\marka\.openclaw\.env

with this line:

DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
  1. Point config at that env var:
#
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
  1. Add the guild allowlist entry if it still isn’t present:
openclaw config set 'channels.discord.guilds["YOUR_SERVER_ID"].requireMention' false --strict-json
  1. Restart the gateway:
openclaw gateway restart
  1. Verify:
#
openclaw channels status --probe
openclaw config get channels.discord

What you want to see:

  • configured, running, connected
  • and a guilds block in config 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:

  1. The file is exactly:
C:\Users\marka\.openclaw\.env
#
  1. The contents are exactly:
DISCORD_BOT_TOKEN=YOUR_REAL_BOT_TOKEN
  1. No quotes, no extra spaces, no .txt extension

  2. 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.

muted creek
#

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

turbid templeBOT
#

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 set commands
  • 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.

muted creek
#

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.

turbid templeBOT
#

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.token config
  • bad guilds path/edit

We’re close, we just need the real error line now.

muted creek
#

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

turbid templeBOT
#

You’re looking for the first real failure line, not the whole output.

In openclaw config validate

Look for lines containing any of these:

  • error
  • invalid
  • failed
  • discord
  • token
  • guilds
  • openclaw.json

In the log tail

Look for lines containing:

  • error
  • fatal
  • SyntaxError
#
  • Failed to parse
  • discord
  • token
  • guilds
  • openclaw.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.

muted creek
#

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 =

turbid templeBOT
#

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:

  • configured
  • running
  • connected

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.

muted creek
#

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

turbid templeBOT
#

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 .txt extension 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.