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

Embed data. More...

#include <FoundationEntities.hpp>

Public Member Functions

embed_dataaddField (jsonifier::string_view name, jsonifier::string_view value, bool Inline=true)
 Adds a field to the embed. More...
 
embed_datasetAuthor (jsonifier::string_view authorName, jsonifier::string_view authorAvatarUrl="")
 Sets the author's name and avatar for the embed. More...
 
embed_datasetColor (jsonifier::string_view hexColorValueNew)
 Sets the color of the embed, by applying a hex-color value. More...
 
embed_datasetDescription (jsonifier::string_view descriptionNew)
 Sets the description (the main contents) of the embed. More...
 
embed_datasetFooter (jsonifier::string_view footerText, jsonifier::string_view footerIconUrlText="")
 Sets the footer's values for the embed. More...
 
embed_datasetImage (jsonifier::string_view imageUrl)
 Sets the image of the embed. More...
 
embed_datasetThumbnail (jsonifier::string_view thumbnailUrl)
 Sets the thumbnail of the embed. More...
 
embed_datasetTimeStamp (jsonifier::string_view timeStamp)
 Sets the timeStamp on the embed. More...
 
embed_datasetTitle (jsonifier::string_view titleNew)
 Sets the title of the embed. More...
 

Public Data Members

embed_author_data author {}
 Embed author data.
 
jsonifier::string description {}
 Description of the embed.
 
unordered_set< jsonifier::string > excludedKeys {}
 For excluding certain keys from parsing/serialization.
 
jsonifier::vector< embed_field_datafields {}
 Array of embed fields.
 
embed_footer_data footer {}
 Embed footer data.
 
uint64_t hexColorValue {}
 Hex color value of the embed.
 
embed_image_data image {}
 Embed image data.
 
embed_provider_data provider {}
 Embed provider data.
 
embed_thumbnail_data thumbnail {}
 Embed thumbnail data.
 
time_stamp timeStamp {}
 Timestamp to be placed on the embed.
 
jsonifier::string title {}
 Title of the embed.
 
jsonifier::string type {}
 Type of the embed.
 
jsonifier::string url {}
 Url for the embed.
 
embed_video_data video {}
 Embed video data.
 

Member Function Documentation

◆ addField()

embed_data & discord_core_api::embed_data::addField ( jsonifier::string_view  name,
jsonifier::string_view  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
embed_data& A reference to this embed_data instance.

Definition at line 263 of file FoundationEntities.cpp.

◆ setAuthor()

embed_data & discord_core_api::embed_data::setAuthor ( jsonifier::string_view  authorName,
jsonifier::string_view  authorAvatarUrl = "" 
)
Parameters
authorNamethe author's name.
authorAvatarUrlthe url to their avatar.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 246 of file FoundationEntities.cpp.

◆ setColor()

embed_data & discord_core_api::embed_data::setColor ( jsonifier::string_view  hexColorValueNew)
Parameters
hexColorValueNewa string containing a hex-number value (between 0x00 0xFFFFFF).
Returns
embed_data& A reference to this embed_data instance.

Definition at line 277 of file FoundationEntities.cpp.

◆ setDescription()

embed_data & discord_core_api::embed_data::setDescription ( jsonifier::string_view  descriptionNew)
Parameters
descriptionNewthe contents of the description to set.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 272 of file FoundationEntities.cpp.

◆ setFooter()

embed_data & discord_core_api::embed_data::setFooter ( jsonifier::string_view  footerText,
jsonifier::string_view  footerIconUrlText = "" 
)
Parameters
footerTextthe footer's text.
footerIconUrlTexturl to the footer's icon.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 252 of file FoundationEntities.cpp.

◆ setImage()

embed_data & discord_core_api::embed_data::setImage ( jsonifier::string_view  imageUrl)
Parameters
imageUrlthe url of the image to be set on the embed.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 292 of file FoundationEntities.cpp.

◆ setThumbnail()

embed_data & discord_core_api::embed_data::setThumbnail ( jsonifier::string_view  thumbnailUrl)
Parameters
thumbnailUrlthe url to the thumbnail to be used.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 282 of file FoundationEntities.cpp.

◆ setTimeStamp()

embed_data & discord_core_api::embed_data::setTimeStamp ( jsonifier::string_view  timeStamp)
Parameters
timeStampthe timeStamp to be set.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 258 of file FoundationEntities.cpp.

◆ setTitle()

embed_data & discord_core_api::embed_data::setTitle ( jsonifier::string_view  titleNew)
Parameters
titleNewa string containing the desired title.
Returns
embed_data& A reference to this embed_data instance.

Definition at line 287 of file FoundationEntities.cpp.


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