mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 22:21:17 +00:00
Webpack build for branch master: 61da73fee0
This commit is contained in:
parent
4f515b2a12
commit
79bcdb16f3
2 changed files with 5 additions and 4 deletions
|
|
@ -2470,11 +2470,12 @@ class GuildMember extends Base {
|
|||
/**
|
||||
* Checks if any of the member's roles have a permission.
|
||||
* @param {PermissionResolvable|PermissionResolvable[]} permission Permission(s) to check for
|
||||
* @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override
|
||||
* @param {boolean} [checkOwner=true] Whether to allow being the guild's owner to override
|
||||
* @param {Object} [options] Options
|
||||
* @param {boolean} [options.checkAdmin=true] Whether to allow the administrator permission to override
|
||||
* @param {boolean} [options.checkOwner=true] Whether to allow being the guild's owner to override
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasPermission(permission, checkAdmin = true, checkOwner = true) {
|
||||
hasPermission(permission, { checkAdmin = true, checkOwner = true } = {}) {
|
||||
if (checkOwner && this.user.id === this.guild.ownerID) return true;
|
||||
return this.roles.some(r => r.permissions.has(permission, checkAdmin));
|
||||
}
|
||||
|
|
|
|||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue