builders

EmbedBuilder

export declare class EmbedBuilder 

Summary

Represents a embed in a message (image/video preview, rich embed, etc.)

Properties

Methods

addFields(fields)

:

this

Adds fields to the embed (max 25)

NameTypeOptionalDescription
fieldsRestOrArray<APIEmbedField>NoNone

setAuthor(options)

:

this

Sets the author of this embed

NameTypeOptionalDescription
optionsEmbedAuthorOptions | nullNoNone

setColor(color)

:

this

Sets the color of this embed

NameTypeOptionalDescription
colornumber | RGBTuple | nullNoNone

setDescription(description)

:

this

Sets the description of this embed

NameTypeOptionalDescription
descriptionstring | nullNoNone

setFields(fields)

:

this

Sets the embed's fields (max 25).

NameTypeOptionalDescription
fieldsRestOrArray<APIEmbedField>NoNone

setFooter(options)

:

this

Sets the footer of this embed

NameTypeOptionalDescription
optionsEmbedFooterOptions | nullNoNone

setImage(url)

:

this

Sets the image of this embed

NameTypeOptionalDescription
urlstring | nullNoNone

setThumbnail(url)

:

this

Sets the thumbnail of this embed

NameTypeOptionalDescription
urlstring | nullNoNone

setTimestamp(timestamp)

:

this

Sets the timestamp of this embed

NameTypeOptionalDescription
timestampnumber | Date | nullYesNone

setTitle(title)

:

this

Sets the title of this embed

NameTypeOptionalDescription
titlestring | nullNoNone

setURL(url)

:

this

Sets the URL of this embed

NameTypeOptionalDescription
urlstring | nullNoNone

spliceFields(index, deleteCount, fields)

:

this

Removes, replaces, or inserts fields in the embed (max 25)

NameTypeOptionalDescription
indexnumberNoNone
deleteCountnumberNoNone
fieldsAPIEmbedField[]NoNone

toJSON()

:

APIEmbed

Transforms the embed to a plain object

builders