Skip to content

Commit

Permalink
feat(interaction): add appPermissions (v13) (#8195)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jun 29, 2022
1 parent 079973f commit 222fc9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/structures/Interaction.js
Expand Up @@ -69,6 +69,12 @@ class Interaction extends Base {
*/
this.version = data.version;

/**
* Set of permissions the application or bot has within the channel the interaction was sent from
* @type {?Readonly<Permissions>}
*/
this.appPermissions = data.app_permissions ? new Permissions(data.app_permissions).freeze() : null;

/**
* The permissions of the member, if one exists, in the channel this interaction was executed in
* @type {?Readonly<Permissions>}
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -1391,6 +1391,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
public type: InteractionType;
public user: User;
public version: number;
public appPermissions: Readonly<Permissions> | null;
public memberPermissions: CacheTypeReducer<Cached, Readonly<Permissions>>;
public locale: string;
public guildLocale: CacheTypeReducer<Cached, string, string, string>;
Expand Down

0 comments on commit 222fc9c

Please sign in to comment.