mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
feat(GuildMember): filter out duplicate roles when updating (#3502)
This commit is contained in:
@@ -522,7 +522,7 @@ class RESTMethods {
|
|||||||
data.channel_id = null;
|
data.channel_id = null;
|
||||||
data.channel = undefined;
|
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);
|
let endpoint = Endpoints.Member(member);
|
||||||
// Fix your endpoints, discord ;-;
|
// Fix your endpoints, discord ;-;
|
||||||
|
|||||||
Reference in New Issue
Block a user