mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01: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:
committed by
Crawl
parent
577ab37a2b
commit
1e47cfdd5d
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user