Discord Social SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
discordpp::ActivityAssets Class Reference

Detailed Description

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.
 
ActivityAssetsoperator= (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.
 
ActivityAssetsoperator= (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.
 

Constructor & Destructor Documentation

◆ ActivityAssets() [1/2]

discordpp::ActivityAssets::ActivityAssets ( ActivityAssets && other)
noexcept

Move constructor for ActivityAssets.

◆ ActivityAssets() [2/2]

discordpp::ActivityAssets::ActivityAssets ( const ActivityAssets & arg0)

Copy constructor for ActivityAssets.

Member Function Documentation

◆ LargeImage()

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.

◆ LargeText()

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.

◆ operator bool()

discordpp::ActivityAssets::operator bool ( ) const
inline

Returns true if the instance contains a valid object.

◆ operator=() [1/2]

ActivityAssets & discordpp::ActivityAssets::operator= ( ActivityAssets && other)
noexcept

Move assignment operator for ActivityAssets.

◆ operator=() [2/2]

ActivityAssets & discordpp::ActivityAssets::operator= ( const ActivityAssets & arg0)

Copy assignment operator for ActivityAssets.

◆ SetLargeImage()

void discordpp::ActivityAssets::SetLargeImage ( std::optional< std::string > LargeImage)

◆ SetLargeText()

void discordpp::ActivityAssets::SetLargeText ( std::optional< std::string > LargeText)

◆ SetSmallImage()

void discordpp::ActivityAssets::SetSmallImage ( std::optional< std::string > SmallImage)

◆ SetSmallText()

void discordpp::ActivityAssets::SetSmallText ( std::optional< std::string > SmallText)

◆ SmallImage()

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.

◆ SmallText()

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.

Member Data Documentation

◆ nullobj

const ActivityAssets discordpp::ActivityAssets::nullobj
static

Uninitialized instance of ActivityAssets.