mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
* ChannelPermissions changed manageRoles to administrator. fixes #507 * fixed manageRoles bug inside lib/ChannelPermissions. fixes #507 fixed related comments inside Role.
This commit is contained in:
parent
ee64253f0b
commit
0adfc0fe95
3 changed files with 5 additions and 5 deletions
|
|
@ -45,8 +45,8 @@ var ChannelPermissions = (function () {
|
||||||
}
|
}
|
||||||
if (!explicit) {
|
if (!explicit) {
|
||||||
// implicit permissions allowed
|
// implicit permissions allowed
|
||||||
if (!!(this.permissions & _Constants.Permissions.manageRoles)) {
|
if (!!(this.permissions & _Constants.Permissions.administrator)) {
|
||||||
// manageRoles allowed, they have all permissions
|
// administrator allowed, they have all permissions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ var Role = (function () {
|
||||||
if (!explicit) {
|
if (!explicit) {
|
||||||
// implicit permissions allowed
|
// implicit permissions allowed
|
||||||
if (!!(this.permissions & _Constants.Permissions.administrator)) {
|
if (!!(this.permissions & _Constants.Permissions.administrator)) {
|
||||||
// manageRoles allowed, they have all permissions
|
// administrator allowed, they have all permissions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ export default class Role {
|
||||||
for (let k of keys) {
|
for (let k of keys) {
|
||||||
obj[k] = this[k];
|
obj[k] = this[k];
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ export default class Role {
|
||||||
}
|
}
|
||||||
if(!explicit){ // implicit permissions allowed
|
if(!explicit){ // implicit permissions allowed
|
||||||
if( !!(this.permissions & Permissions.administrator) ){
|
if( !!(this.permissions & Permissions.administrator) ){
|
||||||
// manageRoles allowed, they have all permissions
|
// administrator allowed, they have all permissions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue