diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 7b26adf58..ba8825719 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -250,10 +250,12 @@ class GuildChannel extends Channel { * Clone 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} [withTopic=true] Whether to clone the channel with this channel's topic * @returns {Promise} */ - clone(name = this.name, withPermissions = true) { - return this.guild.createChannel(name, this.type, withPermissions ? this.permissionOverwrites : []); + clone(name = this.name, withPermissions = true, withTopic = true) { + return this.guild.createChannel(name, this.type, withPermissions ? this.permissionOverwrites : []) + .then(channel => withTopic ? channel.setTopic(this.topic) : channel); } /**