How to disable and enable role permissions to make private categories as well as private channels #1292
Unanswered
Sandeep-Narahari
asked this question in
Q&A
Replies: 1 comment 1 reply
-
With this we are able to create a private category, so in the func CreatePermissionedCategory(s *discordgo.Session) {
cat, err := s.GuildChannelCreateComplex(
"<guildID>",
discordgo.GuildChannelCreateData{
Name: "Newcategory",
Type: 4,
UserLimit: 99,
PermissionOverwrites: []*discordgo.PermissionOverwrite{
{ID: "<roleId>", Type: discordgo.PermissionOverwriteTypeRole, Allow: 0x0000000000000400, Deny: 0},
{ID: "<roleId>", Type: discordgo.PermissionOverwriteTypeRole, Allow: 0, Deny: 0x0000000000000400}},
RateLimitPerUser: 5,
})
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(cat.ParentID, cat.PermissionOverwrites, cat.ID)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
guild.roles.everyone.setPermissions([PermissionsBitField.Flags.SendMessages, PermissionsBitField.Flags.ViewChannel]);
- is there any method like this in DiscordGo?I want to create a private category, I'm able to create a category and permission overwrite type as role, but still its not private, it means we have added a role in that category, but the everyone role is still active and giving permissions to all other users to view this channel as this channel is public. So I think I have change the permissions for the my role to enable view channels and disable view channel for everyone role.
Thank you, please help me out
Beta Was this translation helpful? Give feedback.
All reactions