mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 21:42:05 +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
d11a658f40
commit
ff82297073
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue