mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Fix Role#hasPermission
This commit is contained in:
@@ -157,7 +157,7 @@ class Role {
|
||||
* }
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
hasPermissions(permissions, explicit = false) {
|
||||
return permissions.every(p => this.hasPermission(p, explicit));
|
||||
return new Permissions(this.permissions).has(permissions, !explicit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user