mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 05:22:15 +00:00
Fix GuildMember.hasPermission(s) explicit for owner
This commit is contained in:
parent
38c85dc076
commit
774b4d4694
1 changed files with 2 additions and 2 deletions
|
|
@ -185,7 +185,7 @@ class GuildMember {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
hasPermission(permission, explicit = false) {
|
||||
if (this.guild.owner.id === this.user.id) return true;
|
||||
if (!explicit && this.guild.owner.id === this.user.id) return true;
|
||||
return this.roles.some(r => r.hasPermission(permission, explicit));
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ class GuildMember {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
hasPermissions(permissions, explicit = false) {
|
||||
if (this.guild.owner.id === this.user.id) return true;
|
||||
if (!explicit && this.guild.owner.id === this.user.id) return true;
|
||||
return permissions.map(p => this.hasPermission(p, explicit)).every(v => v);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue