discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Creating a channel with `MANAGE_ROLES` - 50013

Open SamSanai opened this issue 1 year ago • 0 comments

Description

According to the changelog on, 22 January 2021 you require admin permissions or MANAGE_ROLES in the channel before you're able to set the MANAGE_ROLE permission.

But if you have another unrelated channel/category with the MANAGE_ROLE enabled, you're able to create a separate unrelated category/channel with the MANAGE_ROLE permission overwrites.

Permission overwrites in the guild channel creation endpoint are now validated against the permissions your bot has in the guild. Permission overwrites specified in the request body when creating guild channels will now require your bot to also have the permissions being applied. Setting MANAGE_ROLES permission in channel overwrites is only possible for guild administrators or users with MANAGE_ROLES as a permission overwrite in the channel.

Without admin permission you're unable to create a channel and have MANAGE_ROLE enabled for the bot itself, I'm trying to avoid having to tell my users to have admin permissions enabled but with this changelog I don't have a choice, is this the intended behaviour even when making channels?

Steps to Reproduce

  • Give the bot just MANAGE_CHANNELS permission
  • Create a channel with the MANAGE_ROLE permission overwrite for the bot (Throws 50013)
  • Give the bot ADMINISTRATOR and repeat step 2 (Creates the channel)
  • Take away ADMINISTRATOR and repeat step 2 (Creates the channel)
  • Delete the channels and repeat step 2 (Throws 50013)

Expected Behavior

When you remove the ADMINISTRATOR permission, it shouldn't be able to make a channel with the MANAGE_ROLE permission, but it does.

Current Behavior

It makes the channels even though it doesn't have MANAGE_ROLE permissions or ADMINISTRATOR permissions.

Screenshots/Videos

https://github.com/user-attachments/assets/909271a2-b2d9-4762-9801-cefddd92eb5f

Client and System Information

Discord.js - 14.16.2

SamSanai avatar Sep 29 '24 17:09 SamSanai