From 41673b738232f64da2ded3b15be0f798135ae351 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Fri, 11 Jun 2021 11:04:45 +0100 Subject: [PATCH] fix(GuildChannel): clone errors when options.name isn't provided (#5804) --- src/structures/GuildChannel.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 1ea0c9d45deb..1d28714ae25d 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -582,8 +582,7 @@ class GuildChannel extends Channel { * @returns {Promise} */ 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,