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

Inconsistent access to Members/Member permissions #960

Open
gdude2002 opened this issue Jul 23, 2024 · 0 comments
Open

Inconsistent access to Members/Member permissions #960

gdude2002 opened this issue Jul 23, 2024 · 0 comments

Comments

@gdude2002
Copy link
Contributor

Having worked with a user on the KordEx server, I noticed the following:

  1. InteractionCreateEvent doesn't seem to have a useful generic subtype for guild interactions, and also doesn't expose a nullable member property.
  2. Member#getPermissions() ignores the permissions property, which refers to the permissions field present in the Member data provided by interaction events.

These two things together create a footgun which makes it difficult to generically check whether a Member has a given permission (or set of permissions). I'd like to suggest the following changes:

  1. Create a GuildInteractionCreateEvent type inherited by the relevant interaction event subtypes, which exposes a member property encapsulating the data from the interaction event.
  2. Update getPermissions() to return the permissions property by default, which - if provided - will contain all the member's applicable permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant