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 appPermissions (v13) #8195

Merged
merged 1 commit into from Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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