Discord Social SDK
Loading...
Searching...
No Matches
discordpp::UserApplicationProfileHandle Class Reference

Detailed Description

A UserApplicationProfileHandle represents the profile of a user for the current application. This data is populated by the developer using the update_application_user_identity endpoint.

Handle objects in the SDK hold a reference both to the underlying data, and to the SDK instance. Changes to the underlying data will generally be available on existing handles objects without having to re-create them. If the SDK instance is destroyed, but you still have a reference to a handle object, note that it will return the default value for all method calls (ie an empty string for methods that return a string).

Public Member Functions

 UserApplicationProfileHandle (UserApplicationProfileHandle &&other) noexcept
 Move constructor for UserApplicationProfileHandle.
 
UserApplicationProfileHandleoperator= (UserApplicationProfileHandle &&other) noexcept
 Move assignment operator for UserApplicationProfileHandle.
 
 operator bool () const
 Returns true if the instance contains a valid object.
 
 UserApplicationProfileHandle (const UserApplicationProfileHandle &other)
 Copy constructor for UserApplicationProfileHandle.
 
UserApplicationProfileHandleoperator= (const UserApplicationProfileHandle &other)
 Copy assignment operator for UserApplicationProfileHandle.
 
std::string AvatarHash () const
 Returns the user's in-game avatar hash.
 
std::string Metadata () const
 Returns any metadata set by the developer.
 
std::optional< std::string > ProviderId () const
 Returns the user's external identity provider ID if it exists.
 
std::string ProviderIssuedUserId () const
 Returns the user's external identity provider issued user ID.
 
discordpp::ExternalIdentityProviderType ProviderType () const
 Returns the type of the external identity provider.
 
std::string Username () const
 Returns the user's in-game username.
 

Static Public Attributes

static const UserApplicationProfileHandle nullobj
 Uninitialized instance of UserApplicationProfileHandle.
 

Constructor & Destructor Documentation

◆ UserApplicationProfileHandle() [1/2]

discordpp::UserApplicationProfileHandle::UserApplicationProfileHandle ( UserApplicationProfileHandle && other)
noexcept

Move constructor for UserApplicationProfileHandle.

◆ UserApplicationProfileHandle() [2/2]

discordpp::UserApplicationProfileHandle::UserApplicationProfileHandle ( const UserApplicationProfileHandle & other)

Copy constructor for UserApplicationProfileHandle.

Member Function Documentation

◆ AvatarHash()

std::string discordpp::UserApplicationProfileHandle::AvatarHash ( ) const

Returns the user's in-game avatar hash.

◆ Metadata()

std::string discordpp::UserApplicationProfileHandle::Metadata ( ) const

Returns any metadata set by the developer.

◆ operator bool()

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

Returns true if the instance contains a valid object.

◆ operator=() [1/2]

UserApplicationProfileHandle & discordpp::UserApplicationProfileHandle::operator= ( const UserApplicationProfileHandle & other)

Copy assignment operator for UserApplicationProfileHandle.

◆ operator=() [2/2]

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

Move assignment operator for UserApplicationProfileHandle.

◆ ProviderId()

std::optional< std::string > discordpp::UserApplicationProfileHandle::ProviderId ( ) const

Returns the user's external identity provider ID if it exists.

◆ ProviderIssuedUserId()

std::string discordpp::UserApplicationProfileHandle::ProviderIssuedUserId ( ) const

Returns the user's external identity provider issued user ID.

◆ ProviderType()

discordpp::ExternalIdentityProviderType discordpp::UserApplicationProfileHandle::ProviderType ( ) const

Returns the type of the external identity provider.

◆ Username()

std::string discordpp::UserApplicationProfileHandle::Username ( ) const

Returns the user's in-game username.

Member Data Documentation

◆ nullobj

const UserApplicationProfileHandle discordpp::UserApplicationProfileHandle::nullobj
static

Uninitialized instance of UserApplicationProfileHandle.