mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
@@ -45,8 +45,8 @@ var ChannelPermissions = (function () {
|
||||
}
|
||||
if (!explicit) {
|
||||
// implicit permissions allowed
|
||||
if (!!(this.permissions & _Constants.Permissions.manageRoles)) {
|
||||
// manageRoles allowed, they have all permissions
|
||||
if (!!(this.permissions & _Constants.Permissions.administrator)) {
|
||||
// administrator allowed, they have all permissions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ var Role = (function () {
|
||||
if (!explicit) {
|
||||
// implicit permissions allowed
|
||||
if (!!(this.permissions & _Constants.Permissions.administrator)) {
|
||||
// manageRoles allowed, they have all permissions
|
||||
// administrator allowed, they have all permissions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class Role {
|
||||
for (let k of keys) {
|
||||
obj[k] = this[k];
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export default class Role {
|
||||
}
|
||||
if(!explicit){ // implicit permissions allowed
|
||||
if( !!(this.permissions & Permissions.administrator) ){
|
||||
// manageRoles allowed, they have all permissions
|
||||
// administrator allowed, they have all permissions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user