mirror of
https://github.com/danbulant/discord.js
synced 2026-07-09 05:00:48 +00:00
Webpack build for branch master: 84153be894
This commit is contained in:
parent
eef0302227
commit
71c956a9cd
2 changed files with 20 additions and 5 deletions
|
|
@ -5400,9 +5400,14 @@ class GuildMember extends Base {
|
||||||
} else {
|
} else {
|
||||||
endpoint = endpoint.members(this.id);
|
endpoint = endpoint.members(this.id);
|
||||||
}
|
}
|
||||||
return endpoint.patch({ data, reason }).then(newData => {
|
return endpoint.patch({ data, reason }).then(() => {
|
||||||
const clone = this._clone();
|
const clone = this._clone();
|
||||||
clone._patch(newData);
|
data.user = this.user;
|
||||||
|
clone._patch(data);
|
||||||
|
clone._frozenVoiceState = this.voiceState;
|
||||||
|
if (typeof data.mute !== 'undefined') clone._frozenVoiceState.mute = data.mute;
|
||||||
|
if (typeof data.deaf !== 'undefined') clone._frozenVoiceState.mute = data.deaf;
|
||||||
|
if (typeof data.channel_id !== 'undefined') clone._frozenVoiceState.channel_id = data.channel_id;
|
||||||
return clone;
|
return clone;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -5458,7 +5463,11 @@ class GuildMember extends Base {
|
||||||
if (this._roles.includes(role.id)) return Promise.resolve(this);
|
if (this._roles.includes(role.id)) return Promise.resolve(this);
|
||||||
return this.client.api.guilds(this.guild.id).members(this.user.id).roles(role.id)
|
return this.client.api.guilds(this.guild.id).members(this.user.id).roles(role.id)
|
||||||
.put({ reason })
|
.put({ reason })
|
||||||
.then(() => this);
|
.then(() => {
|
||||||
|
const clone = this._clone();
|
||||||
|
if (!clone._roles.includes(role.id)) clone._roles.push(role.id);
|
||||||
|
return clone;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5492,7 +5501,12 @@ class GuildMember extends Base {
|
||||||
if (!this._roles.includes(role.id)) return Promise.resolve(this);
|
if (!this._roles.includes(role.id)) return Promise.resolve(this);
|
||||||
return this.client.api.guilds(this.guild.id).members(this.user.id).roles(role.id)
|
return this.client.api.guilds(this.guild.id).members(this.user.id).roles(role.id)
|
||||||
.delete({ reason })
|
.delete({ reason })
|
||||||
.then(() => this);
|
.then(() => {
|
||||||
|
const clone = this._clone();
|
||||||
|
const index = clone._roles.indexOf(role.id);
|
||||||
|
if (~index) clone._roles.splice(index, 1);
|
||||||
|
return clone;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13820,6 +13834,7 @@ class VoiceChannel extends GuildChannel {
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
super._patch(data);
|
||||||
/**
|
/**
|
||||||
* The bitrate of this voice channel
|
* The bitrate of this voice channel
|
||||||
* @type {number}
|
* @type {number}
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue