mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Merge branch 'master' into voice-rewrite
This commit is contained in:
@@ -411,8 +411,8 @@ class GuildChannel extends Channel {
|
||||
* @returns {Promise<GuildChannel>}
|
||||
*/
|
||||
clone({ name = this.name, withPermissions = true, withTopic = true, reason } = {}) {
|
||||
const options = { overwrites: withPermissions ? this.permissionOverwrites : [], reason };
|
||||
return this.guild.createChannel(name, this.type, options)
|
||||
const options = { overwrites: withPermissions ? this.permissionOverwrites : [], reason, type: this.type };
|
||||
return this.guild.channels.create(name, options)
|
||||
.then(channel => withTopic ? channel.setTopic(this.topic) : channel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user