feat(MessageEmbed): add setFields method (#6186)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Rodry
2021-07-31 13:15:49 +01:00
committed by GitHub
parent 331a9d3ffc
commit a25e16599a
2 changed files with 11 additions and 0 deletions

View File

@@ -298,6 +298,16 @@ class MessageEmbed {
return this;
}
/**
* Sets the embed's fields (max 25).
* @param {...EmbedFieldData|EmbedFieldData[]} fields The fields to set
* @returns {MessageEmbed}
*/
setFields(...fields) {
this.spliceFields(0, this.fields.length, fields);
return this;
}
/**
* Sets the author of this embed.
* @param {string} name The name of the author