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
footer
• 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
Name | Type | Description |
---|---|---|
name | string | The name for the field to display |
value | string | The value for the field |
inline? | boolean | Wether to inline the field or not |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:180
formatColor
▸ Private
formatColor(color
): number
Parameters
Name | Type |
---|---|
color | any |
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
Name | Type | Description |
---|---|---|
author | AuthorOptions | The options for the other must be an object |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:75
setColor
▸ setColor(color
): Embed
Parameters
Name | Type | Description |
---|---|---|
color | string | The hex color for the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:156
setDescription
▸ setDescription(description
): Embed
Parameters
Name | Type | Description |
---|---|---|
description | string | The description for the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:167
setFooter
▸ setFooter(footer
): Embed
Parameters
Name | Type | Description |
---|---|---|
footer | any | The footer for the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:201
setImage
▸ setImage(image
): Embed
Parameters
Name | Type | Description |
---|---|---|
image | undefined | string | The url of the image to display on the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:144
setThumbnail
▸ setThumbnail(url
): Embed
Parameters
Name | Type | Description |
---|---|---|
url | undefined | string | The thumbnail url |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:116
setTimestamp
▸ setTimestamp(date?
): Embed
Parameters
Name | Type | Description |
---|---|---|
date? | Date | The date for the timestamp (Not required) |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:131
setTitle
▸ setTitle(title
): Embed
Parameters
Name | Type | Description |
---|---|---|
title | string | the title for the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:94
setURL
▸ setURL(url
): Embed
Parameters
Name | Type | Description |
---|---|---|
url | string | The url for the embed |
Returns
The embed
Defined in
packages/libcord/src/structures/Embed.ts:105
validateURL
▸ Private
validateURL(url
): boolean
Parameters
Name | Type |
---|---|
url | string |
Returns
boolean