fix(helpers): addFields dont add fields

This commit is contained in:
Marcos Susaña 2023-07-21 12:55:21 -04:00
parent 3f1d37ba68
commit 490898a56f

View File

@ -1,4 +1,4 @@
import { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, ObjectToLower, TypeArray, toSnakeCase } from '@biscuitland/common'; import { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, ObjectToLower, TypeArray, toSnakeCase } from "@biscuitland/common";
export class MessageEmbed { export class MessageEmbed {
constructor(public data: Partial<APIEmbed> = {}) { constructor(public data: Partial<APIEmbed> = {}) {
@ -22,7 +22,7 @@ export class MessageEmbed {
} }
addFields(field: TypeArray<APIEmbedField>): this { addFields(field: TypeArray<APIEmbedField>): this {
this.data.fields?.concat(field); this.data.fields = this.data.fields!.concat(field);
return this; return this;
} }