feat(MessageEmbed): Support EmbedFieldData[] instead of EmbedFi… (#3845)

* fix(typings): MessageEmbedOptions#fields should be EmbedFieldData[]

* feat(MessageEmbed): Allow optional EmbedFieldData#inline in constructor

* docs(MessageEmbed): revert type change of fields

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Ryan Munro
2020-03-01 00:21:43 +11:00
committed by GitHub
parent 9c8aaf1bbc
commit 6650d50a56
2 changed files with 2 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ class MessageEmbed {
* The fields of this embed
* @type {EmbedField[]}
*/
this.fields = data.fields ? data.fields.map(Util.cloneObject) : [];
this.fields = data.fields ? this.constructor.normalizeFields(data.fields) : [];
/**
* @typedef {Object} MessageEmbedThumbnail