diff --git a/src/structures/Role.js b/src/structures/Role.js index 724e8bb19..57985127b 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -131,39 +131,6 @@ class Role extends Base { return sorted.array().indexOf(sorted.get(this.id)); } - /** - * Get an object mapping permission names to whether or not the role enables that permission. - * @returns {Object} - * @example - * // Print the serialized role permissions - * console.log(role.serialize()); - */ - serialize() { - return this.permissions.serialize(); - } - - /** - * Checks if the role has a permission. - * @param {PermissionResolvable|PermissionResolvable[]} permission Permission(s) to check for - * @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permission - * **(deprecated)** - * @param {boolean} [checkAdmin] Whether to allow the administrator permission to override - * (takes priority over `explicit`) - * @returns {boolean} - * @example - * // See if a role can ban a member - * if (role.hasPermission('BAN_MEMBERS')) { - * console.log('This role can ban members'); - * } else { - * console.log('This role can\'t ban members'); - * } - */ - hasPermission(permission, explicit = false, checkAdmin) { - return this.permissions.has( - permission, typeof checkAdmin !== 'undefined' ? checkAdmin : !explicit - ); - } - /** * Compares this role's position to another role's. * @param {RoleResolvable} role Role to compare to this one