dpp::embed
message.h
std::optional< embed_author > std::optional<embed_author> dpp::embed::author author dpp::embed::author

Optional: Author information.

std::optional< uint32_t > std::optional<uint32_t> dpp::embed::color color dpp::embed::color

Optional: Color code of the embed.

std::string std::string dpp::embed::description description dpp::embed::description

Optional: Description of embed.

std::vector< embed_field > std::vector<embed_field> dpp::embed::fields fields dpp::embed::fields

Optional: Fields information.

std::optional< embed_footer > std::optional<embed_footer> dpp::embed::footer footer dpp::embed::footer

Optional: Footer information.

std::optional< embed_image > std::optional<embed_image> dpp::embed::image image dpp::embed::image

Optional: Image information.

std::optional< embed_provider > std::optional<embed_provider> dpp::embed::provider provider dpp::embed::provider

Optional: Provider information.

Can't send this.

std::optional< embed_image > std::optional<embed_image> dpp::embed::thumbnail thumbnail dpp::embed::thumbnail

Optional: Thumbnail information.

time_t time_t dpp::embed::timestamp timestamp dpp::embed::timestamp

Optional: Timestamp of embed content.

std::string std::string dpp::embed::title title dpp::embed::title

Optional: Title of embed.

std::string std::string dpp::embed::type type dpp::embed::type

Optional: Type of embed.

Always "rich" for webhook embeds.

std::string std::string dpp::embed::url url dpp::embed::url

Optional: URL of embed.

std::optional< embed_image > std::optional<embed_image> dpp::embed::video video dpp::embed::video

Optional: Video information.

Can't send this.

dpp::embed::embed
()
embed
dpp::embed::embed

Constructor.

dpp::embed::embed
(nlohmann::json *j)
embed
dpp::embed::embed
nlohmann::json * j

Constructor to build embed from json object.

j

JSON to read content from

dpp::embed::~embed
()
~embed
dpp::embed::~embed

Destructor.

embed & embed & dpp::embed::add_field (std::string_view name, std::string_view value, bool is_inline=false) add_field dpp::embed::add_field std::string_view name std::string_view value bool is_inline false

Add an embed field.

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

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_author (const dpp::embed_author &a) set_author dpp::embed::set_author const dpp::embed_author & a

Set embed author.

a

The author to set

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_author (std::string_view name, std::string_view url, std::string_view icon_url) set_author dpp::embed::set_author std::string_view name std::string_view url std::string_view icon_url

Set embed author.

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)

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_color (uint32_t col) set_color dpp::embed::set_color uint32_t col

Set embed colour.

col

The colour of the embed

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_colour (uint32_t col) set_colour dpp::embed::set_colour uint32_t col

Set embed colour.

col

The colour of the embed

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_description (std::string_view text) set_description dpp::embed::set_description std::string_view text

Set embed description.

text

The text of the title. It will be truncated to the maximum length of 4096 UTF-8 characters.

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_footer (const embed_footer &f) set_footer dpp::embed::set_footer const embed_footer & f

Set the footer of the embed.

f

the footer to set

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_footer (std::string_view text, std::string_view icon_url) set_footer dpp::embed::set_footer std::string_view text std::string_view icon_url

Set the footer of the embed.

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)

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_image (std::string_view url) set_image dpp::embed::set_image std::string_view url

Set embed image.

url

The embed image URL (only supports http(s) and attachments)

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_provider (std::string_view name, std::string_view url) set_provider dpp::embed::set_provider std::string_view name std::string_view url

Set embed provider.

name

The provider name. It will be truncated to the maximum length of 256 UTF-8 characters.

url

The provider url

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_thumbnail (std::string_view url) set_thumbnail dpp::embed::set_thumbnail std::string_view url

Set embed thumbnail.

url

The embed thumbnail url (only supports http(s) and attachments)

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_timestamp (time_t tstamp) set_timestamp dpp::embed::set_timestamp time_t tstamp

Set embed timestamp.

tstamp

The timestamp to show in the footer, should be in UTC

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_title (std::string_view text) set_title dpp::embed::set_title std::string_view text

Set embed title.

text

The text of the title. It will be truncated to the maximum length of 256 UTF-8 characters.

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_url (std::string_view url) set_url dpp::embed::set_url std::string_view url

Set embed url.

url

the url of the embed

A reference to self so this method may be "chained".

embed & embed & dpp::embed::set_video (std::string_view url) set_video dpp::embed::set_video std::string_view url

Set embed video.

url

The embed video url

A reference to self so this method may be "chained".

A rich embed for display within a dpp::message.

T
bool
dpp::embed
description
title
type
url
timestamp
color
footer
image
thumbnail
video
provider
author
fields
dpp::embed_field
name
value
is_inline
std::basic_string< Char >
optional< dpp::embed_author >
optional< dpp::embed_footer >
optional< dpp::embed_image >
optional< dpp::embed_provider >
optional< uint32_t >
std::string
std::vector< T >
elements
std::vector< dpp::embed_field >
elements
< dpp::embed_field >
time_t
- dpp::embed
  add_field
- dpp::embed
  author
- dpp::embed
  color
- dpp::embed
  description
- dpp::embed
  embed
- dpp::embed
  embed
- dpp::embed
  fields
- dpp::embed
  footer
- dpp::embed
  image
- dpp::embed
  provider
- dpp::embed
  set_author
- dpp::embed
  set_author
- dpp::embed
  set_color
- dpp::embed
  set_colour
- dpp::embed
  set_description
- dpp::embed
  set_footer
- dpp::embed
  set_footer
- dpp::embed
  set_image
- dpp::embed
  set_provider
- dpp::embed
  set_thumbnail
- dpp::embed
  set_timestamp
- dpp::embed
  set_title
- dpp::embed
  set_url
- dpp::embed
  set_video
- dpp::embed
  thumbnail
- dpp::embed
  timestamp
- dpp::embed
  title
- dpp::embed
  type
- dpp::embed
  url
- dpp::embed
  video
- dpp::embed
  ~embed