mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
Webpack build for branch master: 986e6da196
This commit is contained in:
parent
6936b5b0b4
commit
ed6a02394e
2 changed files with 16 additions and 13 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
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