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:
FireController1847
2017-06-07 15:47:45 -06:00
committed by Crawl
parent 577ab37a2b
commit 1e47cfdd5d

View File

@@ -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);
}
/**