mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +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 = 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 ;-;
|
||||
|
||||
Reference in New Issue
Block a user