GuildMember#setVoiceChannel fix (#1482)

Looks like someone forgot to remove the full channel object from the PATCH payload.
This commit is contained in:
aemino
2017-05-11 21:41:40 -07:00
committed by Crawl
parent 798018713b
commit e3c3a4fd60

View File

@@ -465,7 +465,10 @@ class RESTMethods {
}
updateGuildMember(member, data) {
if (data.channel) data.channel_id = this.client.resolver.resolveChannel(data.channel).id;
if (data.channel) {
data.channel_id = this.client.resolver.resolveChannel(data.channel).id;
data.channel = null;
}
if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);
let endpoint = Endpoints.Member(member);