Skip to content

Commit

Permalink
fix(GuildMember): do not create a channel key when editing
Browse files Browse the repository at this point in the history
This is to not break GuildMember#setNickname for the current user
  • Loading branch information
SpaceEEC committed May 18, 2019
1 parent e3d03ad commit 06b72ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/rest/RESTMethods.js
Expand Up @@ -513,10 +513,11 @@ class RESTMethods {
return Promise.reject(new Error('Could not resolve channel to a guild voice channel.'));
}
data.channel_id = channel.id;
data.channel = undefined;
} else if (data.channel === 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);

let endpoint = Endpoints.Member(member);
Expand Down

0 comments on commit 06b72ee

Please sign in to comment.