mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Add denied/allowed permissions to PermissionOverwrites (#1562)
* Add denied/allowed permissions to PermissionOverwrites * Remove one accidental trailing space. * Change to _denied/_allowed & denied/allowed This could possible break if people use deny/allow, I assume, but that's okay. * Update PermissionOverwrites.js * Update PermissionOverwrites.js
This commit is contained in:
parent
577ab37a2b
commit
1e47cfdd5d
1 changed files with 16 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
const Permissions = require('../util/Permissions');
|
||||
|
||||
/**
|
||||
* Represents a permission overwrite for a role or member in a guild channel.
|
||||
*/
|
||||
|
|
@ -27,8 +29,20 @@ class PermissionOverwrites {
|
|||
*/
|
||||
this.type = data.type;
|
||||
|
||||
this.deny = data.deny;
|
||||
this.allow = data.allow;
|
||||
this._denied = data.deny;
|
||||
this._allowed = data.allow;
|
||||
|
||||
/**
|
||||
* The permissions that are denied for the user or role.
|
||||
* @type {Permissions}
|
||||
*/
|
||||
this.denied = new Permissions(this._denied);
|
||||
|
||||
/**
|
||||
* The permissions that are allowed for the user or role.
|
||||
* @type {Permissions}
|
||||
*/
|
||||
this.allowed = new Permissions(this._allowed);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue