mirror of
https://github.com/danbulant/discord.js
synced 2026-06-21 15:51:48 +00:00
Webpack build for branch master: 4fb7e64a39
This commit is contained in:
parent
428d328659
commit
91e41d128c
2 changed files with 15 additions and 3 deletions
|
|
@ -3803,11 +3803,23 @@ class GuildChannel extends Channel {
|
|||
* @param {boolean} [options.withPermissions=true] Whether to clone the channel with this channel's
|
||||
* permission overwrites
|
||||
* @param {boolean} [options.withTopic=true] Whether to clone the channel with this channel's topic
|
||||
* @param {boolean} [options.nsfw=this.nsfw] Whether the new channel is nsfw (only text)
|
||||
* @param {number} [options.bitrate=this.bitrate] Bitrate of the new channel in bits (only voice)
|
||||
* @param {number} [options.userLimit=this.userLimit] Maximum amount of users allowed in the new channel (only voice)
|
||||
* @param {ChannelResolvable} [options.parent=this.parent] The parent of the new channel
|
||||
* @param {string} [options.reason] Reason for cloning this channel
|
||||
* @returns {Promise<GuildChannel>}
|
||||
*/
|
||||
clone({ name = this.name, withPermissions = true, withTopic = true, reason } = {}) {
|
||||
const options = { overwrites: withPermissions ? this.permissionOverwrites : [], reason, type: this.type };
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
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