Discord.C++ 0.13.0
Loading...
Searching...
No Matches
DiscordCPP::Embed Class Reference

#include <Embed.h>

Public Member Functions

 Embed (std::string title="", std::string description="")
 
 Embed (const json &data)
 
void set_color (int color)
 
void add_field (const std::string &name, const std::string &value, const bool Inline=true)
 
void set_author (const std::string &name, const std::string &url="", const std::string &icon_url="")
 
void set_footer (const std::string &text, const std::string &icon_url="")
 
void set_image (const std::string &url)
 
void set_thumbnail (const std::string &url)
 
json to_json ()
 

Constructor & Destructor Documentation

◆ Embed() [1/2]

DiscordCPP::Embed::Embed ( std::string title = "",
std::string description = "" )
explicit

◆ Embed() [2/2]

DiscordCPP::Embed::Embed ( const json & data)
explicit

Member Function Documentation

◆ add_field()

void DiscordCPP::Embed::add_field ( const std::string & name,
const std::string & value,
const bool Inline = true )

add a field to the Embed

Parameters
[in]namethe name of the field
[in]valuethe value of the field
[in]Inline(optional) wether the field shall be displayed inline or not(default is true)
Exceptions
SizeError

◆ set_author()

void DiscordCPP::Embed::set_author ( const std::string & name,
const std::string & url = "",
const std::string & icon_url = "" )

◆ set_color()

void DiscordCPP::Embed::set_color ( int color)

◆ set_footer()

void DiscordCPP::Embed::set_footer ( const std::string & text,
const std::string & icon_url = "" )

◆ set_image()

void DiscordCPP::Embed::set_image ( const std::string & url)

◆ set_thumbnail()

void DiscordCPP::Embed::set_thumbnail ( const std::string & url)

◆ to_json()

json DiscordCPP::Embed::to_json ( )

generates json from Embed

Returns
json::value
Exceptions
SizeError

The documentation for this class was generated from the following files: