mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Fix GuildMember.hasPermission(s) explicit for owner
This commit is contained in:
@@ -185,7 +185,7 @@ class GuildMember {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
hasPermission(permission, explicit = false) {
|
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));
|
return this.roles.some(r => r.hasPermission(permission, explicit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ class GuildMember {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
hasPermissions(permissions, explicit = false) {
|
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);
|
return permissions.map(p => this.hasPermission(p, explicit)).every(v => v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user