A rich embed for display within a dpp::message.
More...
#include "message.h"
A rich embed for display within a dpp::message.
◆ embed() [1/2]
◆ embed() [2/2]
◆ ~embed()
◆ add_field()
embed & dpp::embed::add_field |
( |
const std::string & |
name, |
|
|
const std::string & |
value, |
|
|
bool |
is_inline = false |
|
) |
| |
Add an embed field.
- Parameters
-
name | The name of the field. It will be truncated to the maximum length of 256 UTF-8 characters. |
value | The value of the field. It will be truncated to the maximum length of 1024 UTF-8 characters. |
is_inline | Whether or not to display the field 'inline' or on its own line |
- Returns
- A reference to self so this method may be "chained".
◆ set_author() [1/2]
Set embed author.
- Parameters
-
- Returns
- A reference to self so this method may be "chained".
◆ set_author() [2/2]
embed & dpp::embed::set_author |
( |
const std::string & |
name, |
|
|
const std::string & |
url, |
|
|
const std::string & |
icon_url |
|
) |
| |
Set embed author.
- Parameters
-
name | The name of the author. It will be truncated to the maximum length of 256 UTF-8 characters. |
url | The url of the author (only supports http(s)) |
icon_url | The icon URL of the author (only supports http(s) and attachments) |
- Returns
- A reference to self so this method may be "chained".
◆ set_color()
embed & dpp::embed::set_color |
( |
uint32_t |
col | ) |
|
Set embed colour.
- Parameters
-
col | The colour of the embed |
- Returns
- A reference to self so this method may be "chained".
References dpp::embed_footer::icon_url.
◆ set_colour()
embed & dpp::embed::set_colour |
( |
uint32_t |
col | ) |
|
Set embed colour.
- Parameters
-
col | The colour of the embed |
- Returns
- A reference to self so this method may be "chained".
References dpp::embed_footer::proxy_url.
◆ set_description()
embed & dpp::embed::set_description |
( |
const std::string & |
text | ) |
|
Set embed description.
- Parameters
-
text | The text of the title. It will be truncated to the maximum length of 4096 UTF-8 characters. |
- Returns
- A reference to self so this method may be "chained".
References dpp::embed_footer::text, and dpp::utility::utf8substr().
◆ set_footer() [1/2]
Set the footer of the embed.
- Parameters
-
- Returns
- A reference to self so this method may be "chained".
◆ set_footer() [2/2]
embed & dpp::embed::set_footer |
( |
const std::string & |
text, |
|
|
const std::string & |
icon_url |
|
) |
| |
Set the footer of the embed.
- Parameters
-
text | string to set as footer text. It will be truncated to the maximum length of 2048 UTF-8 characters. |
icon_url | an url to set as footer icon url (only supports http(s) and attachments) |
- Returns
- A reference to self so this method may be "chained".
◆ set_image()
embed & dpp::embed::set_image |
( |
const std::string & |
url | ) |
|
Set embed image.
- Parameters
-
url | The embed image URL (only supports http(s) and attachments) |
- Returns
- A reference to self so this method may be "chained".
◆ set_provider()
embed & dpp::embed::set_provider |
( |
const std::string & |
name, |
|
|
const std::string & |
url |
|
) |
| |
Set embed provider.
- Parameters
-
name | The provider name. It will be truncated to the maximum length of 256 UTF-8 characters. |
url | The provider url |
- Returns
- A reference to self so this method may be "chained".
◆ set_thumbnail()
embed & dpp::embed::set_thumbnail |
( |
const std::string & |
url | ) |
|
Set embed thumbnail.
- Parameters
-
url | The embed thumbnail url (only supports http(s) and attachments) |
- Returns
- A reference to self so this method may be "chained".
◆ set_timestamp()
embed & dpp::embed::set_timestamp |
( |
time_t |
tstamp | ) |
|
◆ set_title()
embed & dpp::embed::set_title |
( |
const std::string & |
text | ) |
|
Set embed title.
- Parameters
-
text | The text of the title. It will be truncated to the maximum length of 256 UTF-8 characters. |
- Returns
- A reference to self so this method may be "chained".
References url.
◆ set_url()
embed & dpp::embed::set_url |
( |
const std::string & |
url | ) |
|
◆ set_video()
embed & dpp::embed::set_video |
( |
const std::string & |
url | ) |
|
◆ author
Optional: Author information.
◆ color
std::optional<uint32_t> dpp::embed::color |
Optional: Color code of the embed.
◆ description
std::string dpp::embed::description |
Optional: Description of embed.
Referenced by set_video().
◆ fields
Optional: Fields information.
◆ footer
◆ image
Optional: Image information.
◆ provider
Optional: Provider information.
- Warning
- Can't send this.
◆ thumbnail
Optional: Thumbnail information.
◆ timestamp
time_t dpp::embed::timestamp |
Optional: Timestamp of embed content.
◆ title
std::string dpp::embed::title |
Optional: Title of embed.
◆ type
std::string dpp::embed::type |
Optional: Type of embed.
- Note
- Always "rich" for webhook embeds.
◆ url
std::string dpp::embed::url |
◆ video
Optional: Video information.
- Warning
- Can't send this.
The documentation for this struct was generated from the following files: