diff --git a/src/builders/Embed.ts b/src/builders/Embed.ts index ddcd0bd..f3430ad 100644 --- a/src/builders/Embed.ts +++ b/src/builders/Embed.ts @@ -11,14 +11,16 @@ import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter } from '.. * const embedJSON = embed.json(); */ export class Embed { + public data: Partial; /** * Creates a new instance of Embed. * @param data - The initial data for the embed. * @example * const embed = new Embed({ title: 'Hello', description: 'This is an example embed' }); */ - constructor(public data: Partial = {}) { - if (!data.fields) this.data.fields = []; + constructor(data: Partial = {}) { + this.data = { ...data }; + if (!this.data.fields) this.data.fields = []; } /**