mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
feat(interaction): add appPermissions (v13) (#8195)
This commit is contained in:
@@ -69,6 +69,12 @@ class Interaction extends Base {
|
|||||||
*/
|
*/
|
||||||
this.version = data.version;
|
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
|
* The permissions of the member, if one exists, in the channel this interaction was executed in
|
||||||
* @type {?Readonly<Permissions>}
|
* @type {?Readonly<Permissions>}
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -1391,6 +1391,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
|||||||
public type: InteractionType;
|
public type: InteractionType;
|
||||||
public user: User;
|
public user: User;
|
||||||
public version: number;
|
public version: number;
|
||||||
|
public appPermissions: Readonly<Permissions> | null;
|
||||||
public memberPermissions: CacheTypeReducer<Cached, Readonly<Permissions>>;
|
public memberPermissions: CacheTypeReducer<Cached, Readonly<Permissions>>;
|
||||||
public locale: string;
|
public locale: string;
|
||||||
public guildLocale: CacheTypeReducer<Cached, string, string, string>;
|
public guildLocale: CacheTypeReducer<Cached, string, string, string>;
|
||||||
|
|||||||
Reference in New Issue
Block a user