From d60132a011f17fccce726dda925874e0303fa166 Mon Sep 17 00:00:00 2001 From: Cinnamon <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 1 Jul 2022 10:02:36 +0700 Subject: [PATCH] feat(interaction): add `appPermissions` (v13) v13.9.0 #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 4095df8..393fb60 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 92371dc..bba08ee 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1453,6 +1453,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;