Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add denied/allowed permissions to PermissionOverwrites #1562

Merged
merged 5 commits into from
Jun 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/structures/PermissionOverwrites.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const Permissions = require('../util/Permissions');

/**
* Represents a permission overwrite for a role or member in a guild channel.
*/
Expand Down Expand Up @@ -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);
}

/**
Expand Down