discord-api-docs
discord-api-docs copied to clipboard
Permissions v2 UI doesn't reflect `default_member_permissions`
Description
Commands with default_member_permissions
show up in the command permissions menu as being enabled for @everyone, even though they are only enabled for certain permissions by default. Instead, they should show up correctly in the menu.
Steps to Reproduce
- Make a command with
default_member_permissions
- Check the command at the integrations tab of the guild
Expected Behavior
It's shown up as disabled for @everyone and enabled for the roles that have the permissions you set up
Current Behavior
It's shown up as enabled for @everyone
Screenshots/Videos
JSON of the deployed command
{
"name": "perms_v2",
"description": "you need manage guilds ithink",
"default_member_permissions": "32"
}
User that doesn't have MANAGE_GUILDS trying to use the command (works as expected, the guild has access to backend v2 too)
The UI fails to reflect that only users with MANAGE_GUILDS can use the command
Client and System Information
Canary 126462 (1f5f36e) Host 1.0.46 Windows 10 64-Bit (10.0.19044)
Another thing to look out for: If the server's admin changes the base integration permissions (and everything remains synced), then all the specific default_member_permissions stop applying, same as if you unsync those commands.
This might be a bug, but only in relation to the present issue, as it is not clear when exactly users are able or unable to use restricted commands. This becomes a vulnerability risk for servers using a bot that depends on permissions v2.
Yes. It's like combining per channel permissions + per role/member permissions + default permissions, makes the "bug" come alive.
I was just looking for this exact thing. A more general description I found is below. @Rapptz any idea if this will be supported? https://msciotti.notion.site/msciotti/Command-Permissions-V2-4d113cb49090409f998f3bd80a06c3bd
I believe I'm having the same issue. setting default_member_permissions to 0 still shows up as enabled for everyone, but they can't use the commands (like intended). It's a bit annoying because now I can't allow everyone to use a command by overriding it in the UI.
It has just been shipped, thanks a lot for adding it!