mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
GuildMember#setVoiceChannel fix (#1482)
Looks like someone forgot to remove the full channel object from the PATCH payload.
This commit is contained in:
parent
798018713b
commit
e3c3a4fd60
1 changed files with 4 additions and 1 deletions
|
|
@ -465,7 +465,10 @@ class RESTMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateGuildMember(member, data) {
|
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);
|
if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);
|
||||||
|
|
||||||
let endpoint = Endpoints.Member(member);
|
let endpoint = Endpoints.Member(member);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue