DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
DiscordCoreAPI::EmbedData Class Reference

Embed data. More...

#include <FoundationEntities.hpp>

Public Member Functions

EmbedDataaddField (const std::string &name, const std::string &value, bool Inline=true)
 Adds a field to the embed.
 
EmbedDatasetAuthor (const std::string &authorName, const std::string &authorAvatarUrl="")
 Sets the author's name and avatar for the embed.
 
EmbedDatasetColor (const std::string &hexColorValueNew)
 Sets the color of the embed, by applying a hex-color value.
 
EmbedDatasetDescription (const std::string &descriptionNew)
 Sets the description (the main contents) of the embed.
 
EmbedDatasetFooter (const std::string &footerText, const std::string &footerIconUrlText="")
 Sets the footer's values for the embed.
 
EmbedDatasetImage (const std::string &imageUrl)
 Sets the image of the embed.
 
EmbedDatasetThumbnail (const std::string &thumbnailUrl)
 Sets the thumbnail of the embed.
 
EmbedDatasetTimeStamp (const std::string &timeStamp)
 Sets the timeStamp on the embed.
 
EmbedDatasetTitle (const std::string &titleNew)
 Sets the title of the embed.
 

Public Data Members

EmbedAuthorData author {}
 Embed author data.
 
std::string description {}
 Description of the embed.
 
std::vector< EmbedFieldDatafields {}
 Array of embed fields.
 
EmbedFooterData footer {}
 Embed footer data.
 
ColorValue hexColorValue { 0 }
 Hex color value of the embed.
 
EmbedImageData image {}
 Embed image data.
 
EmbedProviderData provider {}
 Embed provider data.
 
EmbedThumbnailData thumbnail {}
 Embed thumbnail data.
 
std::string timeStamp {}
 Timestamp to be placed on the embed.
 
std::string title {}
 Title of the embed.
 
std::string type {}
 Type of the embed.
 
std::string url {}
 Url for the embed.
 
EmbedVideoData video {}
 Embed video data.
 

Member Function Documentation

◆ addField()

EmbedData & DiscordCoreAPI::EmbedData::addField ( const std::string &  name,
const std::string &  value,
bool  Inline = true 
)
Parameters
nameThe title of the embed field.
valueThe contents of the embed field.
InlineIs it inline with the rest of the fields on the embed?
Returns
EmbedData& A reference to this embed.

Definition at line 3126 of file FoundationEntities.cpp.

◆ setAuthor()

EmbedData & DiscordCoreAPI::EmbedData::setAuthor ( const std::string &  authorName,
const std::string &  authorAvatarUrl = "" 
)
Parameters
authorNameThe author's name.
authorAvatarUrlThe url to their avatar.
Returns
EmbedData& A reference to this embed.

Definition at line 3109 of file FoundationEntities.cpp.

◆ setColor()

EmbedData & DiscordCoreAPI::EmbedData::setColor ( const std::string &  hexColorValueNew)
Parameters
hexColorValueNewA string containing a hex-number value (Between 0x00 0xFFFFFF).
Returns
EmbedData& A reference to this embed.

Definition at line 3140 of file FoundationEntities.cpp.

◆ setDescription()

EmbedData & DiscordCoreAPI::EmbedData::setDescription ( const std::string &  descriptionNew)
Parameters
descriptionNewThe contents of the description to set.
Returns
EmbedData& A reference to this embed.

Definition at line 3135 of file FoundationEntities.cpp.

◆ setFooter()

EmbedData & DiscordCoreAPI::EmbedData::setFooter ( const std::string &  footerText,
const std::string &  footerIconUrlText = "" 
)
Parameters
footerTextThe footer's text.
footerIconUrlTextUrl to the footer's icon.
Returns
EmbedData& A reference to this embed.

Definition at line 3115 of file FoundationEntities.cpp.

◆ setImage()

EmbedData & DiscordCoreAPI::EmbedData::setImage ( const std::string &  imageUrl)
Parameters
imageUrlThe url of the image to be set on the embed.
Returns
EmbedData& A reference to this embed.

Definition at line 3155 of file FoundationEntities.cpp.

◆ setThumbnail()

EmbedData & DiscordCoreAPI::EmbedData::setThumbnail ( const std::string &  thumbnailUrl)
Parameters
thumbnailUrlThe url to the thumbnail to be used.
Returns
EmbedData& A reference to this embed.

Definition at line 3145 of file FoundationEntities.cpp.

◆ setTimeStamp()

EmbedData & DiscordCoreAPI::EmbedData::setTimeStamp ( const std::string &  timeStamp)
Parameters
timeStampThe timeStamp to be set.
Returns
EmbedData& A reference to this embed.

Definition at line 3121 of file FoundationEntities.cpp.

◆ setTitle()

EmbedData & DiscordCoreAPI::EmbedData::setTitle ( const std::string &  titleNew)
Parameters
titleNewA string containing the desired title.
Returns
EmbedData& A reference to this embed.

Definition at line 3150 of file FoundationEntities.cpp.


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