Constructor
new Embed()
- Source
const { Embed } = require("interactions.js");
const embed = new Embed()
.setTitle('This is a Title')
.setURL('https://github.com/fb-sean/interactions.js')
.setColor('#31B505')
.setAuthor("This is a Author", null, "https://github.com/fb-sean/interactions.js");
Methods
addField(name, value, inline) → {Embed}
Add a field to the embed
You can have a maximum of 25 fields.
Name | Type | Default | Description |
---|---|---|---|
name | String | The field name | |
value | String | The field value | |
inline | Boolean | false | boolean if the embed should be inline |
- Source
- Type:
- Embed
addFields(ArrayOfFields) → {Embed}
Appends fields to the embed You can have a maximum of 25 fields.
Name | Type | Description |
---|---|---|
ArrayOfFields | Array | fields The fields to add |
- Source
- Type:
- Embed
const embed = new Embed()
.addFields(ArrayOfFields);
setAuthor(name, iconUrl, url) → {Embed}
Sets the author of this embed
Name | Type | Description |
---|---|---|
name | String | The name for the author |
iconUrl | String | The icon url for the author |
url | String | The url for the author |
- Source
- Type:
- Embed
setColor(color) → {Embed}
Sets the color of this embed
Name | Type | Description |
---|---|---|
color | String | The color of the embed |
- Source
- Type:
- Embed
setDescription(desc) → {Embed}
Sets the description of this embed
Name | Type | Description |
---|---|---|
desc | String | The description |
- Source
- Type:
- Embed
setFields(ArrayOfFields) → {Embed}
Sets the embed's fields You can set a maximum of 25 fields.
Name | Type | Description |
---|---|---|
ArrayOfFields | Array | fields The fields to set |
- Source
- Type:
- Embed
setFooter(text, iconUrl) → {Embed}
Sets the footer of this embed
Name | Type | Description |
---|---|---|
text | String | The name for the footer |
iconUrl | String | The iconUrl for the footer |
- Source
- Type:
- Embed
setImage(url) → {Embed}
Sets the image of this embed
Name | Type | Description |
---|---|---|
url | String | The URL of the image |
- Source
- Type:
- Embed
setThumbnail(url) → {Embed}
Sets the thumbnail of this embed
Name | Type | Description |
---|---|---|
url | String | The URL of the thumbnail |
- Source
- Type:
- Embed
setTimestamp(timestamp) → {Embed}
Sets the timestamp of this embed
Name | Type | Description |
---|---|---|
timestamp | String | The timestamp or date |
- Source
- Type:
- Embed
setTitle(title) → {Embed}
Sets the title of this embed
Name | Type | Description |
---|---|---|
title | String | The title |
- Source
- Type:
- Embed
setURL(url) → {Embed}
Sets the URL of this embed
Name | Type | Description |
---|---|---|
url | String | The URL |
- Source
- Type:
- Embed