mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
GuildMember#setVoiceChannel fix (#1482)
Looks like someone forgot to remove the full channel object from the PATCH payload.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user