Discord error 50013: Missing permissions
Last verified against Discord Developer Docs - Opcodes and status codes
You lack permissions to perform that actionWhat error 50013 means
The bot can see the target resource but does not hold the specific permission bit the action requires, after role permissions and channel overwrites are combined. The JSON message is "Missing Permissions" on most routes; the canonical docs string is "You lack permissions to perform that action". Either way, it is the single most common error bots produce.
Three things decide the answer. First, the bot's roles: permissions are the union of all roles the bot has, plus @everyone. Second, channel overwrites: a deny on @everyone or on one of the bot's roles removes a permission in that channel even if the role grants it server-wide; an allow on a bot-specific overwrite restores it. Third, role hierarchy: actions that touch members and roles (assigning roles, kicking, banning, changing nicknames, moving in voice) additionally require the bot's highest role to be above the target's highest role, and you can never act on the server owner.
Administrator bypasses overwrites but not hierarchy. Many "I gave it Administrator and it still fails" reports are hierarchy: the role the bot is trying to assign sits above the bot's own role in the role list.
When you need to work out why the bit is missing, resolve it the way Discord does. Start with the base permissions: take the @everyone role's permission integer, then OR in every role the bot holds. If Administrator is in that result, every permission is granted and channel overwrites are skipped entirely. Otherwise apply the channel's overwrites in order: the @everyone overwrite's denies, then its allows; then the denies aggregated across all of the bot's role overwrites, then those allows; then the member-specific deny and allow. A deny applied at a later layer beats an allow from an earlier one, which is why a single red X on the bot's role in one channel defeats a server-wide grant. Two implicit rules finish the picture: denying View Channel implicitly denies everything else in that channel, and denying Send Messages also disables Send TTS Messages, Mention Everyone, Attach Files and Embed Links there. A related trap is replies: those need Read Message History and fail with 160002 rather than 50013.
What it looks like
{
"message": "Missing Permissions",
"code": 50013
}Why it happens
- Bot role missing the permission (Send Messages, Embed Links, Manage Roles, Kick Members, Manage Messages, etc.)
- Channel overwrite denies the permission to @everyone or to the bot's role
- Role hierarchy: target role or target member's top role is above the bot's top role
- Trying to act on the guild owner
- Missing Send Messages in Threads for thread sends, or Embed Links when sending embeds
- Timed-out bot (communication disabled) temporarily loses most permissions
How to fix Discord error 50013
- 1Identify the exact permission the endpoint needs from the docs and check the bot's effective permissions in that channel (Server Settings > Roles, or your library's permissionsFor helper)
- 2Fix the source: grant on the role, remove the channel deny, or add a bot-specific allow overwrite
- 3For role/member actions, drag the bot's role above the target role in Server Settings > Roles, and confirm you are not targeting the owner
- 4Re-invite with an invite URL that includes the needed permission bits if the integration role is too weak
- 5Before acting, compute permissions locally and send a clear message like "I need Manage Roles above the X role" instead of failing
How to stop it recurring
Publish the exact permission bitfield the bot requires and generate the invite link from it. Add a startup or /diagnose check that walks each channel the bot is configured to use and reports missing bits, including hierarchy, so admins fix it proactively. See Discord bot not responding for a full walkthrough.
The full permission-resolution walkthrough, including the channel-overwrite check order in the client UI, is in Discord bot not responding; the role, channel and hierarchy caps that shape it are on the Discord limits page.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 50001: Missing accessMissing access
- 160002: Cannot reply without permission to read message historyCannot reply without permission to read message history
- 50005: Cannot edit a message authored by another userCannot edit a message authored by another user
- 50007: Cannot send messages to this userCannot send messages to this user
- 20016: Slowmode rate limitThis action cannot be performed due to slowmode rate limit
Error 50013 - quick answers
What does Discord error 50013 mean?
The bot can see the target resource but does not hold the specific permission bit the action requires, after role permissions and channel overwrites are combined. The JSON message is "Missing Permissions" on most routes; the canonical docs string is "You lack permissions to perform that action". Either way, it is the single most common error bots produce. Three things decide the answer.
How do I fix Discord error 50013?
1. Identify the exact permission the endpoint needs from the docs and check the bot's effective permissions in that channel (Server Settings > Roles, or your library's permissionsFor helper) 2. Fix the source: grant on the role, remove the channel deny, or add a bot-specific allow overwrite 3. For role/member actions, drag the bot's role above the target role in Server Settings > Roles, and confirm you are not targeting the owner 4. Re-invite with an invite URL that…
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.