Skip to content

Commit

Permalink
feat(GuildMember): filter out duplicate roles when updating (#3502)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC committed Oct 27, 2019
1 parent 1861352 commit f91ad70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/rest/RESTMethods.js
Expand Up @@ -522,7 +522,7 @@ class RESTMethods {
data.channel_id = null;
data.channel = undefined;
}
if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);
if (data.roles) data.roles = [...new Set(data.roles.map(role => role instanceof Role ? role.id : role))];

let endpoint = Endpoints.Member(member);
// Fix your endpoints, discord ;-;
Expand Down

0 comments on commit f91ad70

Please sign in to comment.