mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00: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:
parent
97de79bd5e
commit
3ad16fa351
1 changed files with 2 additions and 1 deletions
|
|
@ -271,10 +271,11 @@ class GuildMember extends Base {
|
|||
throw new Error('GUILD_VOICE_CHANNEL_RESOLVE');
|
||||
}
|
||||
data.channel_id = data.channel.id;
|
||||
data.channel = undefined;
|
||||
} else if (data.channel === 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);
|
||||
let endpoint = this.client.api.guilds(this.guild.id);
|
||||
if (this.user.id === this.client.user.id) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue