#Getting You are not authorized to use this command. error
1 messages · Page 1 of 1 (latest)
Let me verify the docs path, then I’ll tell you the exact fix.
I found the auth section. One more quick check for the exact config knobs, then I’ll answer cleanly.
/restart is auth-gated. On Discord, commands can still show in the UI even when you are not allowed to run them.
The important bit:
/restartis not usuallyownerAllowFrom- it checks whether you are an authorized sender
- if
commands.allowFromis set, that becomes the only command auth source
So the usual fixes are:
{
commands: {
allowFrom: {
discord: ["user:YOUR_DISCORD_USER_ID"]
}
}
}
Or, for guild/thread access, add yourself to the Discord guild/channel user allowlist:
{
channels: {
discord: {
guilds: {
YOUR_SERVER_ID: {
users: ["YOUR_DISCORD_USER_ID"],
channels: {
YOUR_CHANNEL_ID: {
allow: true,
users: ["YOUR_DISCORD_USER_ID"]
}
}
}
}
}
}
}
A couple of gotchas:
channels.discord.allowFromis mainly for DM auth- if
commands.allowFromalready exists, changing only guild/channel users may not fix slash commands - after changing config, restart locally with
openclaw gateway restart