mirror of
https://github.com/danbulant/discord.js
synced 2026-07-10 05:31:13 +00:00
Fix Role#hasPermission
This commit is contained in:
parent
b926cd0dcd
commit
df2333ac82
1 changed files with 2 additions and 2 deletions
|
|
@ -157,7 +157,7 @@ class Role {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
hasPermission(permission, explicit) {
|
hasPermission(permission, explicit) {
|
||||||
return this.client.resolver.hasPermission(this.permissions, permission, explicit);
|
return new Permissions(this.permissions).has(permission, !explicit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -167,7 +167,7 @@ class Role {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
hasPermissions(permissions, explicit = false) {
|
hasPermissions(permissions, explicit = false) {
|
||||||
return permissions.every(p => this.hasPermission(p, explicit));
|
return new Permissions(this.permissions).has(permissions, !explicit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue