mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 19:50:55 +00:00
Webpack build for branch master: 0b5eeb08f3
This commit is contained in:
parent
c32ac4e0c8
commit
717c7d9dc0
2 changed files with 5 additions and 3 deletions
|
|
@ -4649,10 +4649,12 @@ class GuildChannel extends Channel {
|
||||||
* Clone this channel
|
* Clone this channel
|
||||||
* @param {string} [name=this.name] Optional name for the new channel, otherwise it has the name of this channel
|
* @param {string} [name=this.name] Optional name for the new channel, otherwise it has the name of this channel
|
||||||
* @param {boolean} [withPermissions=true] Whether to clone the channel with this channel's permission overwrites
|
* @param {boolean} [withPermissions=true] Whether to clone the channel with this channel's permission overwrites
|
||||||
|
* @param {boolean} [withTopic=true] Whether to clone the channel with this channel's topic
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
*/
|
*/
|
||||||
clone(name = this.name, withPermissions = true) {
|
clone(name = this.name, withPermissions = true, withTopic = true) {
|
||||||
return this.guild.createChannel(name, this.type, withPermissions ? this.permissionOverwrites : []);
|
return this.guild.createChannel(name, this.type, withPermissions ? this.permissionOverwrites : [])
|
||||||
|
.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