Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

464
Views
Changing Category/Channels Permissions Returns Error "Missing Permissions" - Novus/Discord.py

SOLVED - The categories/channels were set to private which is why they couldn't be changed even with the correct permissions. My solution was to tell the user which ones and to add the role with the permissions manually. I added a message that said they can just give the bot administrator permissions and it will do it for them. Hopefully, this helps anyone who runs into this in the future.

I'm trying to change the permissions of multiple categories and channels using the following code:

role = get(guild.roles, name="Fun")
for channel in guild.channels:
    overwrites = channel.overwrites_for(role)
    overwrites.view_channel = False
    await channel.set_permissions(role, overwrite=overwrites)

I get the following error:

await channel.set_permissions(role, overwrite=overwrites)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

It will work if I give the bot the administrator permission. However, it won't work if I give the bot every single other permission, the bot is at the top of the roles, and it has every category permission. What am I missing? I'm using Novus (fork of discord.py so it's pretty much the same thing).

Edit: I've asked people in the discord.py, Novus, and discord developers discord servers and they can't help me either. With the exception of the discord developers server they just didn't answer my question.

Edit 2: I was able to get it working when I manually added the bot's role to the category and enabled view_channel. This won't work, however, because that means the server owner has to manually do this for every category and channel which is really inconvenient.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This is simply how Discord works, if a channel is private and the bot does not have administrator permissions or role that has permissions to view the channel, it is not able to view it.

You can create a new category that the bot can access like this:

role = await guild.create_role(name="Fun")
category = await guild.create_category("category_name")
await category.set_permissions(role, read_messages=True, send_messages=True, connect=True, speak=True)
await category.set_permissions(ctx.guild.me, read_messages=True, send_messages=True, speak=True)

(How to give own bot permission to see categories?)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!