mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(GuildMemberRoleStore): make remove role remove roles again
This commit is contained in:
@@ -70,7 +70,7 @@ class GuildMemberRoleStore extends DataStore {
|
||||
return Promise.reject(new TypeError('INVALID_TYPE', 'roles',
|
||||
'Array or Collection of Roles or Snowflakes', true));
|
||||
}
|
||||
const newRoles = [...new Set(roleOrRoles.concat(this.array()))];
|
||||
const newRoles = this.keyArray().filter(role => !roleOrRoles.includes(role));
|
||||
return this.set(newRoles, reason);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user