Missed a deprecated method removal (#1950)

And another that should be removed too.
This commit is contained in:
bdistin
2017-09-24 10:29:45 -05:00
committed by Crawl
parent c2029a66e9
commit f89ec00b30

View File

@@ -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<string, boolean>}
* @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