Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[user-installed-commands] Interaction app_permissions Includes Initiating Member's Permissions #7251

Open
SomewhatDamaged opened this issue Nov 4, 2024 · 4 comments

Comments

@SomewhatDamaged
Copy link

Description

If neither channel nor guild allows users to use external emoji, but a user with permission to executes a user-installed command, app_permissions value indicates the application has permission to embed emoji—when it can't.

Steps to Reproduce

  1. Create a guild.
  2. Ensure "Use External Emoji" in everyone role is disabled.
  3. Ensure "Use External Emoji" in #general channel is set to deny.
  4. With a test user, join the server.
  5. Set test user's permission for "Use External Emoji" in #general to enabled.
  6. Have test user add an App installed as a user-installed-app.
  7. Run command in #general that would post an external emoji. Take note of app_permissions value.

Expected Behavior

I expect it to either actually use the initiating member's permissions and allow the external emoji to render properly, or set the app_permissions integer correctly so apps don't think they have permission when they don't.

Current Behavior

When my app is told it can use external emoji, but can't, they render like so:
image

Screenshots/Videos

image

Client and System Information

discord.py
Red Bot framework

@advaith1
Copy link
Contributor

advaith1 commented Nov 4, 2024

I think the permission value is accurate but the app can only use external guild emoji from guilds the user is in, not guilds the app's bot is in.

Instead, it's recommended to use app emoji, which can always be used regardless of permissions.

@SomewhatDamaged
Copy link
Author

I think the permission value is accurate but the app can only use external guild emoji from guilds the user is in, not guilds the app's bot is in.

Instead, it's recommended to use app emoji, which can always be used regardless of permissions.

The test user in the above case is in the same server as the external emojis.

@advaith1
Copy link
Contributor

advaith1 commented Nov 4, 2024

does the test user have Nitro?

basically, the app can use any emojis the user can use, plus the app's own emojis.

@SomewhatDamaged
Copy link
Author

does the test user have Nitro?

basically, the app can use any emojis the user can use, plus the app's own emojis.

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants