feat(BaseInteraction): add support for app_permissions (#8194)

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
MateoDeveloper
2022-06-29 17:36:32 -05:00
committed by GitHub
parent c4653f97b1
commit 002d6a5aed
2 changed files with 7 additions and 0 deletions

View File

@@ -70,6 +70,12 @@ class BaseInteraction extends Base {
*/
this.version = data.version;
/**
* Set of permissions the application or bot has within the channel the interaction was sent from
* @type {?Readonly<PermissionsBitField>}
*/
this.appPermissions = data.app_permissions ? new PermissionsBitField(data.app_permissions).freeze() : null;
/**
* The permissions of the member, if one exists, in the channel this interaction was executed in
* @type {?Readonly<PermissionsBitField>}

View File

@@ -1518,6 +1518,7 @@ export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
public type: InteractionType;
public user: User;
public version: number;
public appPermissions: Readonly<PermissionsBitField> | null;
public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>;
public locale: Locale;
public guildLocale: CacheTypeReducer<Cached, Locale>;