#discord commands are not working for my bot
1 messages · Page 1 of 1 (latest)
Yep — let’s narrow down whether this is Discord native slash registration or OpenClaw’s text command parser.
First, can you paste:
openclaw --version
openclaw status --all
For /new specifically, try these checks:
- Send
/newas a standalone message — no extra text before it. Most OpenClaw commands are parsed only when the message starts with/. - If you mean Discord’s popup/native slash command menu: make sure your bot invite included both OAuth scopes:
botapplications.commands
- In Discord Developer Portal → Bot, make sure Message Content Intent is enabled. Without this, text commands like
/newmay not be visible to the bot. - Make sure the bot has channel perms: View Channel, Send Messages, Read Message History; for threads, also Send Messages in Threads.
- Restart the gateway after changing Discord bot settings or config.
- Check logs while sending
/new:
openclaw logs --follow
Docs: https://docs.openclaw.ai/channels/discord and https://docs.openclaw.ai/tools/slash-commands
If you paste the version + status --all output, redact anything secret-looking and I’ll help read it. 🦞
i am not sure if the invite included oauth at all. how can i confirm and can we walk through fixing this please
Yep, we can walk it through.
Important distinction: if the invite was missing applications.commands, Discord’s native slash menu (/new appearing in the Discord command UI) won’t register. OpenClaw text commands may still work if Message Content Intent + permissions are right.
How to confirm:
- In Discord, go to the server where your bot is installed.
- Type
/in a channel where the bot can see messages. - Look for your bot/app in the command list.
- If OpenClaw commands like
/new,/status, etc. do not show under your bot, the invite probably missedapplications.commands, or commands haven’t registered yet.
- If OpenClaw commands like
To fix the invite:
- Open Discord Developer Portal: https://discord.com/developers/applications
- Select your bot application.
- Go to OAuth2 → URL Generator.
- Under Scopes, select:
botapplications.commands
- Under Bot Permissions, select at least:
- View Channels
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Add Reactions optional
- Send Messages in Threads if using threads/forums
- Copy the generated URL and open it in your browser.
- Select the same server and authorize it again. You usually do not need to kick/remove the bot first.
Then on the OpenClaw side:
openclaw gateway restart
After restart, wait a minute or two, then try:
/new
/status
Also check Discord Developer Portal → Bot and make sure Message Content Intent is enabled. That matters for text commands.
If it still doesn’t work after that, paste:
openclaw --version
openclaw status --all
and any relevant openclaw logs --follow lines from when you send /new. Redact tokens/secrets.
Pickles
APP
— 4:17 PM
⚠️ Command produced no visible reply.
That warning is actually useful: Pickles did receive the native Discord slash command. So the invite probably does include applications.commands now, or at least Discord has a registered command for the app.
Now we’re debugging why OpenClaw handled the command but didn’t send a normal visible reply.
Please try these in order:
- Send
/statusfrom Discord’s slash menu. - Send
/newas plain text, not selected from the menu if Discord allows it. Easiest test: type/new, then press Esc to close the command picker, then send the message. - Watch logs while doing that:
openclaw logs --follow
If you see anything about command authorization, group policy, visible replies, or delivery failure, paste that part.
Also paste:
openclaw --version
openclaw status --all
My current read: this is no longer an OAuth/invite-scope problem; it’s likely one of:
- command authorization / allowlist mismatch for your Discord user
- Discord channel/thread delivery permissions
- native-command dispatch path producing no reply
- group-channel visible reply config, especially if final replies are private unless sent through the message tool
Docs for the exact command behavior: https://docs.openclaw.ai/tools/slash-commands
/status returned this Pickles
APP
— 4:18 PM
You are not authorized to use this command.
Aha — good, we found the real issue. The command is reaching Pickles, but your Discord sender is not authorized for OpenClaw commands.
Your Discord user id from this thread is:
672314296671141893
Fix options:
Option A — authorize commands directly
Add your Discord user to commands.allowFrom:
{
commands: {
allowFrom: {
discord: ["user:672314296671141893"]
}
}
}
If you already have commands.allowFrom, add that entry instead of replacing the whole block.
Option B — authorize via the Discord guild config
If this bot is for a Discord server workspace, make sure your guild config includes you under users:
{
channels: {
discord: {
groupPolicy: "allowlist",
guilds: {
"YOUR_SERVER_ID": {
requireMention: true,
users: ["672314296671141893"]
}
}
}
}
}
Then restart the gateway:
openclaw gateway restart
After that, try /status again. If it works, /new should work too.
One important nuance: if commands.allowFrom is set, it becomes the command authorization source; channel allowlists/pairing won’t be used for commands. So if you already have commands.allowFrom, that’s the first place I’d check.
Docs: https://docs.openclaw.ai/tools/slash-commands and https://docs.openclaw.ai/channels/discord
"commands": {}
allowFrom: {
discord: ["user:672314296671141893"]
},
"ownerAllowFrom": [
"telegram:1680296748"
]
},
fix this block for me please @pickle
Yep — that block is malformed because allowFrom and ownerAllowFrom need to be inside commands.
Use this shape:
{
commands: {
allowFrom: {
discord: ["user:672314296671141893"]
},
ownerAllowFrom: [
"telegram:1680296748"
]
}
}
If your config file is strict JSON instead of JSON5, quote the keys and remove trailing commas:
{
"commands": {
"allowFrom": {
"discord": ["user:672314296671141893"]
},
"ownerAllowFrom": [
"telegram:1680296748"
]
}
}
Then restart: