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

feat(Interaction): add memberPermissions #6741

Merged
merged 7 commits into from Oct 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/structures/Interaction.js
Expand Up @@ -73,7 +73,7 @@ class Interaction extends Base {
* This member permissions, if exists, in the channel this interaction was sent in
ObscuritySRL marked this conversation as resolved.
Show resolved Hide resolved
* @type {?Permissions}
ObscuritySRL marked this conversation as resolved.
Show resolved Hide resolved
*/
this.memberPermissions = data.member?.permissions ? new Permissions( data.member.permissions ) : null;
this.memberPermissions = data.member?.permissions != null ? new Permissions(data.member.permissions) : null;
ObscuritySRL marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -1032,6 +1032,7 @@ export class Interaction extends Base {
public type: InteractionType;
public user: User;
public version: number;
public memberPermissions: Permissions | null;
ObscuritySRL marked this conversation as resolved.
Show resolved Hide resolved
public inGuild(): this is this & {
guildId: Snowflake;
member: GuildMember | APIInteractionGuildMember;
Expand Down