Webpack build for branch master: 986e6da196

This commit is contained in:
Travis CI 2018-01-20 18:33:38 +00:00
parent 6936b5b0b4
commit ed6a02394e
2 changed files with 16 additions and 13 deletions

View file

@ -3863,18 +3863,21 @@ class GuildChannel extends Channel {
* @param {string} [options.reason] Reason for cloning this channel
* @returns {Promise<GuildChannel>}
*/
clone({ name = this.name, withPermissions = true, withTopic = true, nsfw, parent, bitrate, userLimit, reason } = {}) {
const options = {
overwrites: withPermissions ? this.permissionOverwrites : [],
nsfw: typeof nsfw === 'undefined' ? this.nsfw : nsfw,
parent: parent || this.parent,
bitrate: bitrate || this.bitrate,
userLimit: userLimit || this.userLimit,
reason,
type: this.type,
};
return this.guild.channels.create(name, options)
.then(channel => withTopic ? channel.setTopic(this.topic) : channel);
clone(options = {}) {
if (typeof options.withPermissions === 'undefined') options.withPermissions = true;
Util.mergeDefault({
name: this.name,
overwrites: options.withPermissions ? this.permissionOverwrites : [],
withTopic: true,
nsfw: this.nsfw,
parent: this.parent,
bitrate: this.bitrate,
userLimit: this.userLimit,
reason: null,
}, options);
options.type = this.type;
return this.guild.channels.create(options.name, options)
.then(channel => options.withTopic ? channel.setTopic(this.topic) : channel);
}
/**

File diff suppressed because one or more lines are too long