Constructor
new Embed()
- Description:
Creates an embed structure.
- Source:
- See:
Members
(readonly) characterCount
- Description:
Returns the character count of the embed.
- Source:
Returns the character count of the embed.
Methods
addField(name, value, inlinenullable) → {Embed}
- Description:
Adds a field to the embed.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
String | Sets the embed field name. |
||
value |
String | Sets the embed field value. |
||
inline |
Boolean |
<nullable> |
false
|
Whether this field should be displayed inline. |
Throws:
Returns:
- Type
- Embed
setAuthor(namenullable, urlnullable, icon_urlnullable) → {Embed}
- Description:
Sets the embed author info.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String |
<nullable> |
The embed author. |
url |
String |
<nullable> |
The url. |
icon_url |
String |
<nullable> |
The embed author image url. |
Throws:
Returns:
- Type
- Embed
setColor(color) → {Embed}
- Description:
Sets the color of the embed.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
color |
String | Number | The color. |
Throws:
Returns:
- Type
- Embed
setDescription(text) → {Embed}
- Description:
Sets the embed description.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The description. |
Throws:
Returns:
- Type
- Embed
setFooter(text, iconnullable) → {Embed}
- Description:
Sets the embed footer.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
String | The footer text. |
|
icon |
String |
<nullable> |
The url of the footer icon. |
Throws:
Returns:
- Type
- Embed
setImage(url) → {Embed}
- Description:
Sets the embed image url.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The image url. |
Returns:
- Type
- Embed
setThumbnail(url) → {Embed}
- Description:
Sets the embed thumbnail image.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The url of the thumbnail. |
Throws:
Returns:
- Type
- Embed
setTimestamp(timestampnullable) → {Embed}
- Description:
Sets the timestamp displayed on the embed.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
timestamp |
Number |
<nullable> |
The UNIX timestamp. |
Returns:
- Type
- Embed
setTitle(title) → {Embed}
- Description:
Sets the title of the embed.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
title |
String | The title of the embed. |
Throws:
Returns:
- Type
- Embed
setURL(url) → {Embed}
- Description:
Sets the url of the embed.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The url. |
Throws:
Returns:
- Type
- Embed
setVideo(url) → {Embed}
- Description:
Sets the embed video url.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The video url. |
Returns:
- Type
- Embed
toJSON() → {Object}
- Description:
Returns the correct Discord format for an embed.
- Source:
Returns:
- Type
- Object
toString() → {String}
- Description:
Converts the embed into string form.
- Source:
Returns:
- Type
- String