mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
memberHasRole, membersWithRole
This commit is contained in:
@@ -187,6 +187,10 @@ var Server = (function (_Equality) {
|
||||
}
|
||||
};
|
||||
|
||||
Server.prototype.rolesOfMember = function rolesOfMember(member) {
|
||||
return this.rolesOfUser(member);
|
||||
};
|
||||
|
||||
Server.prototype.rolesOf = function rolesOf(user) {
|
||||
return this.rolesOfUser(user);
|
||||
};
|
||||
@@ -322,6 +326,16 @@ var Server = (function (_Equality) {
|
||||
return this.client.createChannel.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
|
||||
};
|
||||
|
||||
Server.prototype.membersWithRole = function membersWithRole(role) {
|
||||
return this.members.filter(function (m) {
|
||||
return m.hasRole(role);
|
||||
});
|
||||
};
|
||||
|
||||
Server.prototype.usersWithRole = function usersWithRole(role) {
|
||||
return this.membersWithRole(role);
|
||||
};
|
||||
|
||||
_createClass(Server, [{
|
||||
key: "iconURL",
|
||||
get: function get() {
|
||||
|
||||
Reference in New Issue
Block a user