mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
feat(BaseInteraction): add support for app_permissions (#8194)
Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
@@ -70,6 +70,12 @@ class BaseInteraction 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<PermissionsBitField>}
|
||||||
|
*/
|
||||||
|
this.appPermissions = data.app_permissions ? new PermissionsBitField(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<PermissionsBitField>}
|
* @type {?Readonly<PermissionsBitField>}
|
||||||
|
|||||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -1518,6 +1518,7 @@ export class BaseInteraction<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<PermissionsBitField> | null;
|
||||||
public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>;
|
public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>;
|
||||||
public locale: Locale;
|
public locale: Locale;
|
||||||
public guildLocale: CacheTypeReducer<Cached, Locale>;
|
public guildLocale: CacheTypeReducer<Cached, Locale>;
|
||||||
|
|||||||
Reference in New Issue
Block a user