User/Role specific channel permissions aren't properly reflected from channel options #1312
Closed
3 tasks done
Labels
bug
Something isn't working
Summary
When I parse an application command's channel option's user/role permissions, the permissions returned are not accurate.
Reproduction Steps
Create a slash command with a TextChannel option, with the ability to default back to
ctx.channel
, and return the permissions in some way. (I only tested TextChannel when creating this issue.)Deny a role or a member the ability to view Channel A, or deny all the permissions listed on Channel A's permissions in the client.
Run the slash command with Channel A as the channel option.
Run the slash command again in Channel A, while having the channel option/argument empty so it defaults to context Channel A.
Both commands will show different permissions for channel A.
Minimal Reproducible Code
Expected Results
I expected to see the same permissions returned for both commands.
Actual Results
When the
channel
object is retrieved from the context (discord.ApplicationContext
), the permissions are accurate.However when the
channel
object is retrieved from the channel option, the permissions are inaccurate. All of the inaccurate permissions are assigned True when they are actually False. The ones that are inaccurate during my testing include:|
On the left is when I run the slash command with channel as an option (inaccurate permissions),
On the right is when I run the slash command with the channel from
ctx.channel
. (correct permissions)Intents
intents = discord.Intents(guilds = True, members = True, presences = True, messages = True, reactions = True, emojis = True, invites = True, voice_states = True, message_content = True)
System Information
Checklist
Additional Context
Just like this similar issue regarding members from slash commands, I can get the channel again as a workaround
The text was updated successfully, but these errors were encountered: