Search code examples
pythondiscordbots

Problem in create private category in Discord.py


role = await guild.create_role(name=role_name, colour=0x1eff00)
category = await guild.create_category(role_name)
await category.set_permissions(role, view_channel=True, read_messages=True, send_messages=True, connect=True, speak=True)

I wanted to create a private category, but I'm not able to, I can only create non-category channels, when I create the category, only users with the rule should be able to see it, but they are seeing all users


Solution

  • This question can be answered with a simple Google search, so here:

    Creating a category in discordpy with permissions that only a specific role can join and type in