Skip to main content

Class: Embed

Constructors​

constructor​

• new Embed()

Defined in​

packages/libcord/src/structures/Embed.ts:58

Properties​

author​

• Optional author: AuthorOptions

The author

Defined in​

packages/libcord/src/structures/Embed.ts:51


color​

• Optional color: string | number

The color

Defined in​

packages/libcord/src/structures/Embed.ts:31


description​

• Optional description: string

The description

Defined in​

packages/libcord/src/structures/Embed.ts:16


fields​

• Optional fields: Object[]

Embed fields

Defined in​

packages/libcord/src/structures/Embed.ts:56


• Optional footer: FooterOptions

The footer

Defined in​

packages/libcord/src/structures/Embed.ts:36


image​

• Optional image: ImageOptions

The image

Defined in​

packages/libcord/src/structures/Embed.ts:41


thumbnail​

• Optional thumbnail: ThumbnailOptions

The thumbnail

Defined in​

packages/libcord/src/structures/Embed.ts:46


timestamp​

• Optional timestamp: Date

The timestamp

Defined in​

packages/libcord/src/structures/Embed.ts:26


title​

• Optional title: string

The title

Defined in​

packages/libcord/src/structures/Embed.ts:11


url​

• Optional url: string

The URL

Defined in​

packages/libcord/src/structures/Embed.ts:21

Methods​

addField​

▸ addField(name, value, inline?): Embed

Parameters​

NameTypeDescription
namestringThe name for the field to display
valuestringThe value for the field
inline?booleanWether to inline the field or not

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:180


formatColor​

▸ Private formatColor(color): number

Parameters​

NameType
colorany

Returns​

number

Defined in​

packages/libcord/src/structures/Embed.ts:232


getJSON​

▸ getJSON(): object

Returns​

object

Defined in​

packages/libcord/src/structures/Embed.ts:237


setAuthor​

▸ setAuthor(author): Embed

Parameters​

NameTypeDescription
authorAuthorOptionsThe options for the other must be an object

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:75


setColor​

▸ setColor(color): Embed

Parameters​

NameTypeDescription
colorstringThe hex color for the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:156


setDescription​

▸ setDescription(description): Embed

Parameters​

NameTypeDescription
descriptionstringThe description for the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:167


setFooter​

▸ setFooter(footer): Embed

Parameters​

NameTypeDescription
footeranyThe footer for the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:201


setImage​

▸ setImage(image): Embed

Parameters​

NameTypeDescription
imageundefined | stringThe url of the image to display on the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:144


setThumbnail​

▸ setThumbnail(url): Embed

Parameters​

NameTypeDescription
urlundefined | stringThe thumbnail url

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:116


setTimestamp​

▸ setTimestamp(date?): Embed

Parameters​

NameTypeDescription
date?DateThe date for the timestamp (Not required)

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:131


setTitle​

▸ setTitle(title): Embed

Parameters​

NameTypeDescription
titlestringthe title for the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:94


setURL​

▸ setURL(url): Embed

Parameters​

NameTypeDescription
urlstringThe url for the embed

Returns​

Embed

The embed

Defined in​

packages/libcord/src/structures/Embed.ts:105


validateURL​

▸ Private validateURL(url): boolean

Parameters​

NameType
urlstring

Returns​

boolean

Defined in​

packages/libcord/src/structures/Embed.ts:220