mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
feat(GuildMember): filter out duplicate roles when updating (#3502)
This commit is contained in:
parent
18613526bd
commit
f91ad7023b
1 changed files with 1 additions and 1 deletions
|
|
@ -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 ;-;
|
||||
|
|
|
|||
Loading…
Reference in a new issue