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
When you receive a interaction, the member object has a permissions field, which allows you to check what permissions the member has, however this is "thrown away" when creating the MemberData.
It would be nice if there was a Member entity that does expose the permissions field, so you can do permissions checks without needing to do REST calls.
While @lukellmann pointed out that there is GuildInteraction.permissions, having the Member object have the permissions field is also useful for slash command options, because Members retrieved from the resolved objects field in slash commands also have the permissions field.
Example: Let's suppose you have a /user info @LustigerLurch command, and you want to show the permissions' of the provided member in the command, the permissions of the user are provided in the partial member within the resolved.members map. This avoids a REST request to get the roles' permissions.
The text was updated successfully, but these errors were encountered:
MrPowerGamerBR
changed the title
Missing permissions field on Kord Core's Member object
Missing interactions permissions field on Kord Core's Member object
Aug 9, 2022
Tmpod
added a commit
to Tmpod/kord
that referenced
this issue
Oct 13, 2023
When you receive a interaction, the member object has a
permissions
field, which allows you to check what permissions the member has, however this is "thrown away" when creating theMemberData
.It would be nice if there was a
Member
entity that does expose thepermissions
field, so you can do permissions checks without needing to do REST calls.While @lukellmann pointed out that there is
GuildInteraction.permissions
, having theMember
object have thepermissions
field is also useful for slash command options, because Members retrieved from theresolved
objects field in slash commands also have thepermissions
field.Example: Let's suppose you have a
/user info @LustigerLurch
command, and you want to show the permissions' of the provided member in the command, the permissions of the user are provided in the partial member within theresolved.members
map. This avoids a REST request to get the roles' permissions.The text was updated successfully, but these errors were encountered: