question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discord Channel Permissions Inconsistencies

See original GitHub issue

I’m getting a lot of these:

net.dv8tion.jda.core.exceptions.ErrorResponseException: 50013: Missing Permissions
    at net.dv8tion.jda.core.exceptions.ErrorResponseException.create(ErrorResponseException.java:145)
    at net.dv8tion.jda.core.requests.Request.onFailure(Request.java:83)
    at net.dv8tion.jda.core.entities.impl.TextChannelImpl$4.handleResponse(TextChannelImpl.java:360)
    at net.dv8tion.jda.core.requests.Request.handleResponse(Request.java:166)
    at net.dv8tion.jda.core.requests.Requester.execute(Requester.java:186)
    at net.dv8tion.jda.core.requests.Requester.execute(Requester.java:86)
    at net.dv8tion.jda.core.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:310)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

To reproduce: Give the bot the “Manage Roles” permission, and try to do something like clearing Emojis from a message. The problem here is, that I can’t even check this in front of, because JDA will tell me that yes, it does have permissions to Manage Messages only to then error out when queue()ing that action. @MinnDevelopment explained it to me like this:

MANAGE_ROLES = MANAGE_PERMISSIONS MANAGE_PERMISSIONS -> ALL_TEXT_PERMISSIONS ALL_TEXT_PERMISSIONS -> MANAGE_MESSAGE

and that this was an inconsistency in handling permissions on Discords side.

So how can I know in this case in advance that I am missing a permission?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
V-Play-Gamescommented, Jun 8, 2022

I think this issue can now be closed, no?

0reactions
DV8FromTheWorldcommented, Aug 4, 2021

If this is indeed the case then PermissionUtil will need to be re-evaluated to see if the situation has changed and if we need to modify our functionality to match the now-fixed functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord Role Permissions Errors : r/discordapp - Reddit
So I'm helping someone set up voice channels, and receiving warnings about these permission changes affecting me when I have a higher role?...
Read more >
5 Ways to Fix Discord when Permissions (Roles) Are Not ...
How do I fix Discord when permissions (roles) are not working? · 1. Check your Internet connection · 2. Override the channel ·...
Read more >
How Roles cause Missing Permission Errors in Discord.js
After struggling to understand why my Discord.js bot was throwing a DiscordAPIError: Missing Permissions even with full admin permissions, I found out that ......
Read more >
Avoid These FATAL Discord Server Mistakes Even Pros Make
These mistakes could kill your Discord server in the blink of an eye! With over 4 years of experience, I've learned that even...
Read more >
Permissions (extended) - discord.js Guide
One possible scenario causing this: the channel has permission overwrites for the default role @everyone to grant SendMessages so everyone who ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found