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

Detailed Description

When one user invites another to join their game on Discord, it will send a message to that user. The SDK will parse those messages for you automatically, and this struct contains all of the relevant invite information which is needed to later accept that invite.

Public Member Functions

 ActivityInvite (ActivityInvite &&other) noexcept
 Move constructor for ActivityInvite.
 
ActivityInviteoperator= (ActivityInvite &&other) noexcept
 Move assignment operator for ActivityInvite.
 
 operator bool () const
 Returns true if the instance contains a valid object.
 
 ActivityInvite (const ActivityInvite &rhs)
 Copy constructor for ActivityInvite.
 
ActivityInviteoperator= (const ActivityInvite &rhs)
 Copy assignment operator for ActivityInvite.
 
uint64_t SenderId () const
 The user id of the user who sent the invite.
 
void SetSenderId (uint64_t SenderId)
 Setter for ActivityInvite::SenderId.
 
uint64_t ChannelId () const
 The id of the Discord channel in which the invite was sent.
 
void SetChannelId (uint64_t ChannelId)
 Setter for ActivityInvite::ChannelId.
 
uint64_t MessageId () const
 The id of the Discord message that contains the invite.
 
void SetMessageId (uint64_t MessageId)
 Setter for ActivityInvite::MessageId.
 
discordpp::ActivityActionTypes Type () const
 The type of invite that was sent.
 
void SetType (discordpp::ActivityActionTypes Type)
 Setter for ActivityInvite::Type.
 
uint64_t ApplicationId () const
 The target application of the invite.
 
void SetApplicationId (uint64_t ApplicationId)
 Setter for ActivityInvite::ApplicationId.
 
std::string PartyId () const
 The id of the party the invite was sent for.
 
void SetPartyId (std::string PartyId)
 Setter for ActivityInvite::PartyId.
 
std::string SessionId () const
 The session id of the user who sent the invite.
 
void SetSessionId (std::string SessionId)
 Setter for ActivityInvite::SessionId.
 
bool IsValid () const
 Whether or not this invite is currently joinable. An invite becomes invalid if it was sent more than 6 hours ago or if the sender is no longer playing the game the invite is for.
 
void SetIsValid (bool IsValid)
 Setter for ActivityInvite::IsValid.
 

Static Public Attributes

static const ActivityInvite nullobj
 Uninitialized instance of ActivityInvite.
 

Constructor & Destructor Documentation

◆ ActivityInvite() [1/2]

discordpp::ActivityInvite::ActivityInvite ( ActivityInvite && other)
noexcept

Move constructor for ActivityInvite.

◆ ActivityInvite() [2/2]

discordpp::ActivityInvite::ActivityInvite ( const ActivityInvite & rhs)

Copy constructor for ActivityInvite.

Member Function Documentation

◆ ApplicationId()

uint64_t discordpp::ActivityInvite::ApplicationId ( ) const

The target application of the invite.

◆ ChannelId()

uint64_t discordpp::ActivityInvite::ChannelId ( ) const

The id of the Discord channel in which the invite was sent.

◆ IsValid()

bool discordpp::ActivityInvite::IsValid ( ) const

Whether or not this invite is currently joinable. An invite becomes invalid if it was sent more than 6 hours ago or if the sender is no longer playing the game the invite is for.

◆ MessageId()

uint64_t discordpp::ActivityInvite::MessageId ( ) const

The id of the Discord message that contains the invite.

◆ operator bool()

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

Returns true if the instance contains a valid object.

◆ operator=() [1/2]

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

Move assignment operator for ActivityInvite.

◆ operator=() [2/2]

ActivityInvite & discordpp::ActivityInvite::operator= ( const ActivityInvite & rhs)

Copy assignment operator for ActivityInvite.

◆ PartyId()

std::string discordpp::ActivityInvite::PartyId ( ) const

The id of the party the invite was sent for.

◆ SenderId()

uint64_t discordpp::ActivityInvite::SenderId ( ) const

The user id of the user who sent the invite.

◆ SessionId()

std::string discordpp::ActivityInvite::SessionId ( ) const

The session id of the user who sent the invite.

◆ SetApplicationId()

void discordpp::ActivityInvite::SetApplicationId ( uint64_t ApplicationId)

◆ SetChannelId()

void discordpp::ActivityInvite::SetChannelId ( uint64_t ChannelId)

◆ SetIsValid()

void discordpp::ActivityInvite::SetIsValid ( bool IsValid)

◆ SetMessageId()

void discordpp::ActivityInvite::SetMessageId ( uint64_t MessageId)

◆ SetPartyId()

void discordpp::ActivityInvite::SetPartyId ( std::string PartyId)

◆ SetSenderId()

void discordpp::ActivityInvite::SetSenderId ( uint64_t SenderId)

◆ SetSessionId()

void discordpp::ActivityInvite::SetSessionId ( std::string SessionId)

◆ SetType()

void discordpp::ActivityInvite::SetType ( discordpp::ActivityActionTypes Type)

Setter for ActivityInvite::Type.

◆ Type()

discordpp::ActivityActionTypes discordpp::ActivityInvite::Type ( ) const

The type of invite that was sent.

Member Data Documentation

◆ nullobj

const ActivityInvite discordpp::ActivityInvite::nullobj
static

Uninitialized instance of ActivityInvite.