mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
fix(GuildMemberRoleManager): unable to remove roles when passed an array (#5556)
This commit is contained in:
@@ -134,7 +134,7 @@ class GuildMemberRoleManager {
|
|||||||
throw new TypeError('INVALID_TYPE', 'roles', 'Array or Collection of Roles or Snowflakes', true);
|
throw new TypeError('INVALID_TYPE', 'roles', 'Array or Collection of Roles or Snowflakes', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const newRoles = this._roles.filter(role => !roleOrRoles.includes(role));
|
const newRoles = this._roles.filter(role => !roleOrRoles.includes(role.id));
|
||||||
return this.set(newRoles, reason);
|
return this.set(newRoles, reason);
|
||||||
} else {
|
} else {
|
||||||
const roleID = this.guild.roles.resolveID(roleOrRoles);
|
const roleID = this.guild.roles.resolveID(roleOrRoles);
|
||||||
|
|||||||
Reference in New Issue
Block a user