mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
fix(GuildChannel): clone errors when options.name isn't provided (#5804)
This commit is contained in:
@@ -582,8 +582,7 @@ class GuildChannel extends Channel {
|
|||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
*/
|
*/
|
||||||
clone(options = {}) {
|
clone(options = {}) {
|
||||||
return this.guild.channels.create(options.name, {
|
return this.guild.channels.create(options.name ?? this.name, {
|
||||||
name: this.name,
|
|
||||||
permissionOverwrites: this.permissionOverwrites,
|
permissionOverwrites: this.permissionOverwrites,
|
||||||
topic: this.topic,
|
topic: this.topic,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
|
|||||||
Reference in New Issue
Block a user