Fix OpenClaw Discord Permission Errors: Missing Permissions 50013
OpenClaw was previously known as Clawdbot and Moltbot. This guide applies to all versions.
Fix OpenClaw Discord permission error 50013 by checking channel permissions, role hierarchy, and bot invite scopes. Includes the minimum permission set and reinvite walkthrough.
Key takeaways
- Error 50013 means Discord blocked your bot from performing an action due to missing permissions at the channel or server level. Check channel-level permissions first, then role hierarchy.
- Server-level and channel-level permissions are separate. A bot can have "Send Messages" granted at the server level and still be blocked in a specific channel where the permission is overridden.
- Role hierarchy controls what a bot can do. If your bot's role is near the bottom of the list, Discord limits what it can affect. Drag the role higher in Server Settings > Roles.
- Wrong OAuth2 scopes at invite time cause permissions that can't be fixed from Server Settings alone. If the permissions look right but the error persists, reinvite the bot with the correct URL from the developer portal.
Your OpenClaw Discord bot is online and connected, but it logs error 50013 whenever it tries to read or send a message. The bot isn't misconfigured. Discord is blocking it at the permission level. Fix it by checking channel permissions, adjusting role position, or reinviting with the correct OAuth2 scopes.
Always review commands your agent suggests before approving them. Don't paste prompts from sources you don't trust.
Fixes when it breaks. Workflows when it doesn't.
OpenClaw guides, configs, and troubleshooting notes. Every two weeks.
What causes OpenClaw Discord permission error 50013
This is what the error looks like in your OpenClaw logs:
DiscordAPIError: Missing Permissions
Code: 50013Discord returns code 50013 any time a bot tries to do something it isn't authorized to do in that specific context. Sending a message, reading message history, embedding links: if the permission isn't explicitly granted, the API refuses and logs 50013.
The tricky part is that Discord has two separate permission layers. Server-level permissions apply across the whole guild. Channel-level permissions apply to a single channel and can override server-level settings. A bot that looks fine in Server Settings can be quietly blocked in one specific channel where someone toggled a permission off.
50013 is also the error you'll see if your bot was invited without the right OAuth2 scopes. Scopes are set at invite time, not in Server Settings. If the bot was invited via a URL that didn't include all the necessary permissions, there's no amount of role editing that will fix it. You have to reinvite.
How to fix missing permissions for your OpenClaw Discord bot
Start with the minimum permission set. OpenClaw needs these five permissions to read and reply to messages in a channel:
- View Channel
- Send Messages
- Read Message History
- Embed Links
- Attach Files
These need to be allowed for the bot's role at both the server level and the channel level. A conflict between those two layers is the most common cause of 50013.
Go to Server Settings > Roles. Find the role assigned to your bot. Check that none of those five permissions are denied there. If they're neutral (not explicitly allowed or denied), that's fine. If they're denied, change them to allowed or neutral.
Then check the specific channel. That process is in the next section.
After fixing permissions, OpenClaw doesn't need a restart. Discord permission changes take effect immediately. Send a test message to confirm.
How to check Discord channel permissions for your bot
Right-click the channel where the error is happening and select "Edit Channel." Go to the "Permissions" tab.
You'll see two things: a list of roles, and possibly a list of individual members. Find your bot's role in the list. If it's not listed separately, the channel is inheriting its permissions from the server-level role settings, and you need to add it.
Click the "+" button to add the bot's role to the channel. Then check each of the five permissions listed above.
Discord shows three states per permission: allowed (green checkmark), neutral (dash), and denied (red X). You want all five of your required permissions set to allowed, not neutral, in the channel override. Neutral means "inherit from role," which is fine if the role already allows it, but if there's any doubt, set them explicitly.
One permission that trips people up: "Read Message History." Without it, the bot can receive new messages but can't reference anything older than the current session. Some features break silently without it.
If your bot is responding in some channels but not others, the channel permissions are almost certainly the problem. Check every channel where it fails and compare against one where it works.
Why Discord role hierarchy blocks your OpenClaw bot
Discord's role hierarchy isn't just about who outranks who socially. It controls what a bot can actually do to other roles and members.
A bot can only manage roles, move members, and perform moderation actions on roles that are positioned below its own role in the list. If your bot's role is at the bottom of the list, it's effectively limited to what a regular member can do regardless of the permissions you grant it.
For OpenClaw, this mostly matters if you're using moderation features. Basic messaging works regardless of role position as long as the permissions are granted. But if the bot needs to delete messages or manage roles, hierarchy position is the gate.
Fix it by going to Server Settings > Roles. Drag your bot's role up in the list. A reasonable position is just below your admin roles and above regular member roles. You don't need to put it at the top unless it's doing moderation work.
Role position changes take effect immediately. No reinvite needed.
After repositioning, go back to the channel where 50013 was appearing and test again. If the error clears, hierarchy was the problem.
How to reinvite your OpenClaw Discord bot with correct scopes
If you've verified channel permissions and role hierarchy and 50013 still appears, the bot was probably invited without all the required OAuth2 permissions baked into the invite URL. You can't patch this from inside Discord. You need to generate a new invite URL and re-authorize the bot.
Go to the Discord Developer Portal and select your bot application. Click "OAuth2" in the left sidebar, then "URL Generator."
Under "Scopes," select:
botapplications.commands(required if you use slash commands with OpenClaw)
Under "Bot Permissions," select at minimum:
- View Channels
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Use External Emojis
- Add Reactions
Copy the generated URL at the bottom of the page. Open it in your browser, select your server, and authorize. This doesn't kick the bot. It updates the bot's permission set in your server.
After reauthorizing, check the channel permissions again. You may need to re-add the bot's role to specific channel overrides if Discord reset them during the reinvite.
If you use slash commands, also make sure applications.commands was included in the scope. That scope is what registers slash commands with Discord. Without it, slash commands won't appear even if everything else works. See the FAQ below for more on this.
For questions about which channels or servers OpenClaw is allowed to operate in, see the channel and guild allowlist guide. This article doesn't cover allowlist config: that's a separate layer on top of Discord's native permissions.
FAQ
Can my OpenClaw Discord bot manage roles or kick users?
It can, but those permissions aren't included by default. You need to regenerate the invite URL in the developer portal with "Manage Roles" and "Kick Members" checked under Bot Permissions, then reinvite. The bot's role must also be positioned above the roles it's trying to manage. Granting Manage Roles lets the bot assign any role below its own position, so position the bot role carefully.
Why can't my OpenClaw Discord bot delete messages?
Deleting messages requires the "Manage Messages" permission. OpenClaw doesn't include this in the default minimum permission set because most setups don't need it. If your bot needs to delete its own messages or messages from other users, go to the Discord developer portal, generate a new invite URL with "Manage Messages" checked under Bot Permissions, and reinvite the bot. For the bot to delete messages from other users, it also needs to be positioned above those users' highest role in the server hierarchy.
Can I use slash commands with OpenClaw on Discord?
Yes, but slash commands require a separate OAuth2 scope called applications.commands. This scope is not included in a basic bot invite. When you generate the invite URL in the Discord developer portal under OAuth2 > URL Generator, check both bot and applications.commands under Scopes. If slash commands aren't appearing after reinviting, give Discord a few minutes to propagate the registration. The gateway error 4014 guide covers intent setup, which is a separate requirement that works alongside scopes.
Do I need to reinvite my OpenClaw Discord bot every time I change permissions?
No. Role and channel permission changes you make inside Discord's Server Settings apply immediately without reinviting. Reinviting is only necessary when you need to change the OAuth2 scopes the bot was originally authorized with. For example, if you want to add slash command support after the fact, that requires a new invite URL because applications.commands is a scope set during authorization. Regular permission changes like adding View Channel or Send Messages to a channel override don't require reinviting.
Changelog
- 2026-03-07: Created (split from fix-openclaw-discord-errors)
Fixes when it breaks. Workflows when it doesn't.
OpenClaw guides, configs, and troubleshooting notes. Every two weeks.



