From 222fc9c6792272be7a123e790f6eb13fcabdba86 Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 29 Jun 2022 23:36:07 +0100 Subject: [PATCH] feat(interaction): add `appPermissions` (v13) (#8195) --- src/structures/Interaction.js | 6 ++++++ typings/index.d.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/structures/Interaction.js b/src/structures/Interaction.js index 4095df8efe85..393fb6078110 100644 --- a/src/structures/Interaction.js +++ b/src/structures/Interaction.js @@ -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} + */ + 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} diff --git a/typings/index.d.ts b/typings/index.d.ts index d57aac09be76..4b606bc1a31e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1391,6 +1391,7 @@ export class Interaction extends Base { public type: InteractionType; public user: User; public version: number; + public appPermissions: Readonly | null; public memberPermissions: CacheTypeReducer>; public locale: string; public guildLocale: CacheTypeReducer;