kordlib/kord

Missing interactions `permissions` field on Kord Core's `Member` object

MrPowerGamerBR opened this issue · 0 comments

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.

image