mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix for a small hasPermission error (#1971)
This commit is contained in:
@@ -306,7 +306,7 @@ class GuildMember extends Base {
|
||||
if (typeof checkAdmin === 'undefined') checkAdmin = !explicit;
|
||||
if (typeof checkOwner === 'undefined') checkOwner = !explicit;
|
||||
if (checkOwner && this.user.id === this.guild.ownerID) return true;
|
||||
return this.roles.some(r => r.hasPermission(permission, undefined, checkAdmin));
|
||||
return this.roles.some(r => r.permissions.has(permission, undefined, checkAdmin));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user