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 String &name, const String &value, Bool Inline=true)
 Adds a field to the embed. More...
 
EmbedDatasetAuthor (const String &authorName, const String &authorAvatarUrl="")
 Sets the author's name and avatar for the embed. More...
 
EmbedDatasetColor (const String &hexColorValueNew)
 Sets the color of the embed, by applying a hex-color value. More...
 
EmbedDatasetDescription (const String &descriptionNew)
 Sets the description (the main contents) of the embed. More...
 
EmbedDatasetFooter (const String &footerText, const String &footerIconUrlText="")
 Sets the footer's values for the embed. More...
 
EmbedDatasetImage (const String &imageUrl)
 Sets the image of the embed. More...
 
EmbedDatasetThumbnail (const String &thumbnailUrl)
 Sets the thumbnail of the embed. More...
 
EmbedDatasetTimeStamp (const String &timeStamp)
 Sets the timestamp on the embed. More...
 
EmbedDatasetTitle (const String &titleNew)
 Sets the title of the embed. More...
 

Public Data Members

EmbedAuthorData author {}
 Embed author data.
 
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.
 
String timestamp {}
 Timestamp to be placed on the embed.
 
String title {}
 Title of the embed.
 
String type {}
 Type of the embed.
 
String url {}
 Url for the embed.
 
EmbedVideoData video {}
 Embed video data.
 

Member Function Documentation

◆ addField()

EmbedData & DiscordCoreAPI::EmbedData::addField ( const String &  name,
const String &  value,
Bool  Inline = true 
)

Adds a field to the embed.

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 3098 of file FoundationEntities.cpp.

◆ setAuthor()

EmbedData & DiscordCoreAPI::EmbedData::setAuthor ( const String &  authorName,
const String &  authorAvatarUrl = "" 
)

Sets the author's name and avatar for the embed.

Parameters
authorNameThe author's name.
authorAvatarUrlThe url to their avatar.
Returns
EmbedData& A reference to this embed.

Definition at line 3081 of file FoundationEntities.cpp.

◆ setColor()

EmbedData & DiscordCoreAPI::EmbedData::setColor ( const String &  hexColorValueNew)

Sets the color of the embed, by applying a hex-color value.

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

Definition at line 3112 of file FoundationEntities.cpp.

◆ setDescription()

EmbedData & DiscordCoreAPI::EmbedData::setDescription ( const String &  descriptionNew)

Sets the description (the main contents) of the embed.

Parameters
descriptionNewThe contents of the description to set.
Returns
EmbedData& A reference to this embed.

Definition at line 3107 of file FoundationEntities.cpp.

◆ setFooter()

EmbedData & DiscordCoreAPI::EmbedData::setFooter ( const String &  footerText,
const String &  footerIconUrlText = "" 
)

Sets the footer's values for the embed.

Parameters
footerTextThe footer's text.
footerIconUrlTextUrl to the footer's icon.
Returns
EmbedData& A reference to this embed.

Definition at line 3087 of file FoundationEntities.cpp.

◆ setImage()

EmbedData & DiscordCoreAPI::EmbedData::setImage ( const String &  imageUrl)

Sets the image of the embed.

Parameters
imageUrlThe url of the image to be set on the embed.
Returns
EmbedData& A reference to this embed.

Definition at line 3127 of file FoundationEntities.cpp.

◆ setThumbnail()

EmbedData & DiscordCoreAPI::EmbedData::setThumbnail ( const String &  thumbnailUrl)

Sets the thumbnail of the embed.

Parameters
thumbnailUrlThe url to the thumbnail to be used.
Returns
EmbedData& A reference to this embed.

Definition at line 3117 of file FoundationEntities.cpp.

◆ setTimeStamp()

EmbedData & DiscordCoreAPI::EmbedData::setTimeStamp ( const String &  timeStamp)

Sets the timestamp on the embed.

Parameters
timeStampThe timestamp to be set.
Returns
EmbedData& A reference to this embed.

Definition at line 3093 of file FoundationEntities.cpp.

◆ setTitle()

EmbedData & DiscordCoreAPI::EmbedData::setTitle ( const String &  titleNew)

Sets the title of the embed.

Parameters
titleNewA string containing the desired title.
Returns
EmbedData& A reference to this embed.

Definition at line 3122 of file FoundationEntities.cpp.


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