mirror of
https://github.com/danbulant/discord.js
synced 2026-06-05 07:42:09 +00:00
fix(GuildMemberRoleStore): make remove role remove roles again
This commit is contained in:
parent
3f6a0e4de1
commit
3e6c3107c2
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ class GuildMemberRoleStore extends DataStore {
|
||||||
return Promise.reject(new TypeError('INVALID_TYPE', 'roles',
|
return Promise.reject(new TypeError('INVALID_TYPE', 'roles',
|
||||||
'Array or Collection of Roles or Snowflakes', true));
|
'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);
|
return this.set(newRoles, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue