fix(GuildChannel): clone errors when options.name isn't provided (#5804)

This commit is contained in:
Mark Fisher
2021-06-11 11:04:45 +01:00
committed by GitHub
parent 53d8e49dca
commit 41673b7382

View File

@@ -582,8 +582,7 @@ class GuildChannel extends Channel {
* @returns {Promise<GuildChannel>}
*/
clone(options = {}) {
return this.guild.channels.create(options.name, {
name: this.name,
return this.guild.channels.create(options.name ?? this.name, {
permissionOverwrites: this.permissionOverwrites,
topic: this.topic,
type: this.type,