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