You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having worked with a user on the KordEx server, I noticed the following:
InteractionCreateEvent doesn't seem to have a useful generic subtype for guild interactions, and also doesn't expose a nullable member property.
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:
Create a GuildInteractionCreateEvent type inherited by the relevant interaction event subtypes, which exposes a member property encapsulating the data from the interaction event.
Update getPermissions() to return the permissions property by default, which - if provided - will contain all the member's applicable permissions.
The text was updated successfully, but these errors were encountered:
Having worked with a user on the KordEx server, I noticed the following:
InteractionCreateEvent
doesn't seem to have a useful generic subtype for guild interactions, and also doesn't expose a nullablemember
property.Member#getPermissions()
ignores thepermissions
property, which refers to thepermissions
field present in theMember
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:GuildInteractionCreateEvent
type inherited by the relevant interaction event subtypes, which exposes amember
property encapsulating the data from the interaction event.getPermissions()
to return thepermissions
property by default, which - if provided - will contain all the member's applicable permissions.The text was updated successfully, but these errors were encountered: