mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
Remove all deprecated methods / props
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const util = require('util');
|
||||
|
||||
/**
|
||||
* Represents a role on Discord.
|
||||
@@ -167,17 +166,6 @@ class Role {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the role has all specified permissions.
|
||||
* @param {PermissionResolvable[]} permissions The permissions to check for
|
||||
* @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permissions
|
||||
* @returns {boolean}
|
||||
* @deprecated
|
||||
*/
|
||||
hasPermissions(permissions, explicit = false) {
|
||||
return new Permissions(this.permissions).has(permissions, !explicit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this role's position to another role's.
|
||||
* @param {Role} role Role to compare to this one
|
||||
@@ -351,8 +339,4 @@ class Role {
|
||||
}
|
||||
}
|
||||
|
||||
Role.prototype.hasPermissions = util
|
||||
.deprecate(Role.prototype.hasPermissions,
|
||||
'Role#hasPermissions is deprecated - use Role#hasPermission instead, it now takes an array');
|
||||
|
||||
module.exports = Role;
|
||||
|
||||
Reference in New Issue
Block a user