Thursday 28 October 2021

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

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, bot it 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.



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

No comments:

Post a Comment