Discord Error 50013 means Missing Permissions. It appears when a bot tries to perform an action it does not have permission to execute. You might see this error even when the bot’s role is positioned above the target user or channel in the role hierarchy. This happens because role position alone does not grant permissions — the bot must also have the correct permission flags enabled. This article explains the exact technical reasons Error 50013 persists, how to verify and assign the required permissions, and what to do when the error still appears after you have checked role hierarchy.
Key Takeaways: Fixing Discord Error 50013 When Bot Role Position Is Correct
- Server Settings > Roles > Bot Role > Permissions: The bot must have explicit permission flags enabled for the action it tries to perform, not just a high role position.
- Channel-specific permission overrides: Even if the bot role has global permissions, a channel may deny those permissions through overrides — check each target channel.
- Discord API permission bitfield: The bot’s code must request the exact permission integer that matches the action; a mismatch in the bitfield causes Error 50013.
Why Error 50013 Occurs Even When the Bot Role Is Above the Target
Error 50013 is a Missing Permissions error returned by the Discord API. It means the bot does not have the specific permission required to complete the requested action. Many server administrators assume that if the bot’s role is positioned above the target user or channel, the bot automatically inherits all permissions. This is not correct. Role hierarchy only determines which roles can moderate other roles — it does not grant any permission by itself.
The technical root cause is that the bot lacks one or more of the following:
- The permission flag in the bot role’s permission list (Server Settings > Roles > Bot Role > Permissions)
- The permission flag in the channel-specific permission overrides (Channel Settings > Permissions)
- The correct permission integer in the bot’s code when using the Discord API or a library like discord.py or discord.js
Additionally, the bot may be missing the Administrator permission, which bypasses all permission checks. Without Administrator, every action requires the exact permission flag to be enabled at the server or channel level.
The Role of Permission Overrides in Channels
Even if the bot role has all permissions enabled globally, a channel can override those permissions. For example, a channel might deny the Send Messages permission for the bot role. In that case, the bot cannot send messages in that channel, and Error 50013 appears. Check channel-specific permission overrides by right-clicking the channel, selecting Edit Channel, then the Permissions tab, and looking at the bot role’s entries.
How Discord API Permission Bitfields Work
When a bot uses the Discord API, it must request the correct permission integer for each action. For example, to kick a member, the bot needs the Kick Members permission, which corresponds to bitfield value 2. If the bot’s code requests a permission integer that does not match the action, the API returns Error 50013. This happens even if the bot role has the permission enabled in the server settings — the code must pass the correct integer.
Steps to Diagnose and Fix Error 50013 When Role Position Is Correct
- Check the bot role’s global permissions
Go to Server Settings > Roles. Find the bot role. Click the three dots next to it and select Edit Role. Open the Permissions tab. Scroll through the list and verify that the specific permission required for the action is toggled on. For example, if the bot tries to manage messages, enable Manage Messages. - Check channel-specific permission overrides
Right-click the channel where the error occurs. Select Edit Channel. Go to the Permissions tab. Find the bot role in the list. Look for the permission required and make sure it is set to a green checkmark (allowed) instead of a red X (denied) or gray slash (neutral). If the permission is neutral, the global role permission applies. If it is denied, change it to allowed. - Verify the bot’s code permission integer
Open the bot’s source code. Find the API call that triggers the error. Check the permission integer being passed. For discord.py, look forpermissionsin theguild.rolesorchannel.set_permissionscall. For discord.js, checkPermissionFlagsin themessage.memberorchannel.permissionOverwrites. Ensure the integer matches the action. Use the Discord Permission Calculator at discordapi.com/permissions.html to generate the correct integer. - Enable Administrator permission as a test
Temporarily enable the Administrator permission in the bot role. If the error disappears, you know the issue is a missing specific permission. Disable Administrator after testing and enable only the required permissions instead. - Reinvite the bot with the correct permissions
Use the Discord Developer Portal to generate a new invite URL with the exact permissions needed. Go to your application in the Developer Portal, select OAuth2 > URL Generator, check the bot scope, and then check the required permission flags. Use the generated URL to reinvite the bot. This ensures the bot’s token is associated with the correct permission bitfield from the start. - Check if the target user’s role is above the bot’s role
Even if the bot role is above the target user, the target user might have another role that is higher than the bot role. Discord uses the highest role of the target user for hierarchy checks. Go to Server Settings > Roles and sort roles by position. Ensure the bot role is above every role the target user has. If not, move the bot role above the highest role of the target user.
If Discord Error 50013 Still Appears After the Main Fix
Bot Cannot Manage Messages in a Specific Channel
The bot role has Manage Messages enabled globally, but Error 50013 still appears when the bot tries to delete messages. Check the channel’s permission overrides. A common mistake is that the @everyone role has Manage Messages denied in that channel. Even if the bot role is allowed, the @everyone denial can cascade. To fix this, set the bot role’s Manage Messages override to allowed explicitly in the channel.
Bot Cannot Create Threads in a Forum Channel
Forum channels have separate permissions for creating threads and sending messages. Error 50013 appears if the bot lacks the Create Public Threads or Create Private Threads permission. Enable these permissions in the bot role’s global permissions or in the channel overrides.
Bot Cannot Add Reactions to Messages
The Add Reactions permission is required for the bot to add reactions. If the bot role has this permission but the error persists, check if the target channel has the Use External Emoji permission disabled. If the bot uses custom emoji from another server, that permission must be enabled.
Discord Permission Types: Global vs Channel Override vs API Bitfield
| Item | Global Role Permissions | Channel Permission Overrides | API Bitfield in Code |
|---|---|---|---|
| Where set | Server Settings > Roles > Bot Role > Permissions | Channel Settings > Permissions > Bot Role | Bot’s source code (e.g., discord.py, discord.js) |
| What it controls | Default permission for all channels unless overridden | Overrides the global permission for a specific channel | The exact integer the bot sends with API requests |
| Why Error 50013 appears | Permission flag is off | Override is set to deny | Integer does not match the action |
Error 50013 is caused by a missing permission at one of these three levels. Role position above the target user only affects moderation actions like kick, ban, and timeout — it does not bypass permission checks for other actions. To fully resolve the error, verify all three layers: global permissions, channel overrides, and the API bitfield in the bot’s code. Use the Discord Permission Calculator to generate the correct integer and reinvite the bot if needed. After applying these checks, the bot will be able to perform the intended action without Error 50013 appearing.