fix(GuildMemberRoleStore): make remove role remove roles again

This commit is contained in:
Pascal
2018-03-05 14:50:59 +01:00
parent 3f6a0e4de1
commit 3e6c3107c2

View File

@@ -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);
}