mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
typings(MessageEmebd): fix typings for addFields (#3821)
* typings(MessageEmebd): fix typings for addFields * fix: add missing semicolon * docs(MessageEmbed): fix various types * in accordance with the scope of the PR * Update src/structures/MessageEmbed.js Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
@@ -216,7 +216,7 @@ class MessageEmbed {
|
||||
|
||||
/**
|
||||
* Adds a fields to the embed (max 25).
|
||||
* @param {...EmbedField|EmbedField[]} fields The fields to add
|
||||
* @param {...EmbedFieldData|EmbedFieldData[]} fields The fields to add
|
||||
* @returns {MessageEmbed}
|
||||
*/
|
||||
addFields(...fields) {
|
||||
@@ -228,7 +228,7 @@ class MessageEmbed {
|
||||
* Removes, replaces, and inserts fields in the embed (max 25).
|
||||
* @param {number} index The index to start at
|
||||
* @param {number} deleteCount The number of fields to remove
|
||||
* @param {...EmbedField|EmbedField[]} [fields] The replacing field objects
|
||||
* @param {...EmbedFieldData|EmbedFieldData[]} [fields] The replacing field objects
|
||||
* @returns {MessageEmbed}
|
||||
*/
|
||||
spliceFields(index, deleteCount, ...fields) {
|
||||
@@ -386,9 +386,16 @@ class MessageEmbed {
|
||||
return { name, value, inline };
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} EmbedFieldData
|
||||
* @property {StringResolvable} name The name of this field
|
||||
* @property {StringResolvable} value The value of this field
|
||||
* @property {boolean} [inline] If this field will be displayed inline
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check for valid field input and resolves strings
|
||||
* @param {...EmbedField|EmbedField[]} fields Fields to normalize
|
||||
* @param {...EmbedFieldData|EmbedFieldData[]} fields Fields to normalize
|
||||
* @returns {EmbedField[]}
|
||||
*/
|
||||
static normalizeFields(...fields) {
|
||||
|
||||
Reference in New Issue
Block a user