Discord Social SDK
|
Struct which controls what your rich presence looks like in the Discord client. If you don't specify any values, the icon and name of your application will be used as defaults.
Image assets can be either the unique identifier for an image you uploaded to your application via the Rich Presence
page in the Developer portal, or they can be an external image URL.
As an example, if I uploaded an asset and name it goofy-icon
, I could set either image field to the string goofy-icon
. Alternatively, if my icon was hosted at http://my-site.com/goofy.jpg
, I could pass that URL into either image field.
See https://discord.com/developers/docs/rich-presence/overview#adding-custom-art-assets for more information on using custom art assets, as well as for visual examples of what each field does.
Public Member Functions | |
ActivityAssets (ActivityAssets &&other) noexcept | |
Move constructor for ActivityAssets. | |
ActivityAssets & | operator= (ActivityAssets &&other) noexcept |
Move assignment operator for ActivityAssets. | |
operator bool () const | |
Returns true if the instance contains a valid object. | |
ActivityAssets (const ActivityAssets &arg0) | |
Copy constructor for ActivityAssets. | |
ActivityAssets & | operator= (const ActivityAssets &arg0) |
Copy assignment operator for ActivityAssets. | |
std::optional< std::string > | LargeImage () const |
The primary image identifier or URL, rendered as a large square icon on a user's rich presence. | |
void | SetLargeImage (std::optional< std::string > LargeImage) |
Setter for ActivityAssets::LargeImage. | |
std::optional< std::string > | LargeText () const |
A tooltip string that is shown when the user hovers over the large image. | |
void | SetLargeText (std::optional< std::string > LargeText) |
Setter for ActivityAssets::LargeText. | |
std::optional< std::string > | SmallImage () const |
The secondary image, rendered as a small circle over the largeImage . | |
void | SetSmallImage (std::optional< std::string > SmallImage) |
Setter for ActivityAssets::SmallImage. | |
std::optional< std::string > | SmallText () const |
A tooltip string that is shown when the user hovers over the small image. | |
void | SetSmallText (std::optional< std::string > SmallText) |
Setter for ActivityAssets::SmallText. | |
Static Public Attributes | |
static const ActivityAssets | nullobj |
Uninitialized instance of ActivityAssets. | |
|
noexcept |
Move constructor for ActivityAssets.
discordpp::ActivityAssets::ActivityAssets | ( | const ActivityAssets & | arg0 | ) |
Copy constructor for ActivityAssets.
std::optional< std::string > discordpp::ActivityAssets::LargeImage | ( | ) | const |
The primary image identifier or URL, rendered as a large square icon on a user's rich presence.
If specified, must be a string between 1 and 256 characters.
std::optional< std::string > discordpp::ActivityAssets::LargeText | ( | ) | const |
A tooltip string that is shown when the user hovers over the large image.
If specified, must be a string between 2 and 128 characters.
|
inline |
Returns true if the instance contains a valid object.
|
noexcept |
Move assignment operator for ActivityAssets.
ActivityAssets & discordpp::ActivityAssets::operator= | ( | const ActivityAssets & | arg0 | ) |
Copy assignment operator for ActivityAssets.
void discordpp::ActivityAssets::SetLargeImage | ( | std::optional< std::string > | LargeImage | ) |
Setter for ActivityAssets::LargeImage.
void discordpp::ActivityAssets::SetLargeText | ( | std::optional< std::string > | LargeText | ) |
Setter for ActivityAssets::LargeText.
void discordpp::ActivityAssets::SetSmallImage | ( | std::optional< std::string > | SmallImage | ) |
Setter for ActivityAssets::SmallImage.
void discordpp::ActivityAssets::SetSmallText | ( | std::optional< std::string > | SmallText | ) |
Setter for ActivityAssets::SmallText.
std::optional< std::string > discordpp::ActivityAssets::SmallImage | ( | ) | const |
The secondary image, rendered as a small circle over the largeImage
.
If specified, must be a string between 1 and 256 characters.
std::optional< std::string > discordpp::ActivityAssets::SmallText | ( | ) | const |
A tooltip string that is shown when the user hovers over the small image.
If specified, must be a string between 2 and 128 characters.
|
static |
Uninitialized instance of ActivityAssets.