mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
fix(GuildMember): do not create a channel key when editing
This is to not break GuildMember#setNickname for the current user
This commit is contained in:
@@ -513,10 +513,11 @@ class RESTMethods {
|
|||||||
return Promise.reject(new Error('Could not resolve channel to a guild voice channel.'));
|
return Promise.reject(new Error('Could not resolve channel to a guild voice channel.'));
|
||||||
}
|
}
|
||||||
data.channel_id = channel.id;
|
data.channel_id = channel.id;
|
||||||
|
data.channel = undefined;
|
||||||
} else if (data.channel === null) {
|
} else if (data.channel === null) {
|
||||||
data.channel_id = 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);
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user