D++ (DPP)
C++ Discord API Bot Library
dpp::invite Class Reference

Represents an invite to a discord guild or channel. More...

#include <invite.h>

+ Inheritance diagram for dpp::invite:
+ Collaboration diagram for dpp::invite:

Public Member Functions

 invite ()
 
virtual ~invite ()=default
 
invitefill_from_json (nlohmann::json *j)
 
virtual std::string build_json (bool with_id=false) const
 

Public Attributes

std::string code
 
time_t expires_at
 
snowflake guild_id
 
snowflake channel_id
 
snowflake inviter_id
 
snowflake target_user_id
 
uint8_t target_type
 
uint32_t approximate_presence_count
 
uint32_t approximate_member_count
 
uint32_t max_age
 
uint32_t max_uses
 
bool temporary
 
bool unique
 
uint32_t uses
 
stage_instance stage
 
time_t created_at
 

Detailed Description

Represents an invite to a discord guild or channel.

Constructor & Destructor Documentation

◆ invite()

dpp::invite::invite ( )

Constructor

◆ ~invite()

virtual dpp::invite::~invite ( )
virtualdefault

Destructor

Member Function Documentation

◆ build_json()

virtual std::string dpp::invite::build_json ( bool  with_id = false) const
virtual

Build JSON from this object.

Parameters
with_idInclude ID in JSON
Returns
The JSON text of the invite

Reimplemented from dpp::json_interface< invite >.

◆ fill_from_json()

invite & dpp::invite::fill_from_json ( nlohmann::json *  j)

Read class values from json object

Parameters
jA json object to read from
Returns
A reference to self

Member Data Documentation

◆ approximate_member_count

uint32_t dpp::invite::approximate_member_count

Approximate number of total users online and offline

Note
Only returned from cluster::invite_get

◆ approximate_presence_count

uint32_t dpp::invite::approximate_presence_count

Approximate number of online users

Note
Only returned from cluster::invite_get

◆ channel_id

snowflake dpp::invite::channel_id

Channel ID this invite is for

◆ code

std::string dpp::invite::code

Invite code

◆ created_at

time_t dpp::invite::created_at

Timestamp at which the invite was created

◆ expires_at

time_t dpp::invite::expires_at

Readonly expiration timestamp of this invite or 0 if the invite doesn't expire

Note
Only returned from cluster::invite_get

◆ guild_id

snowflake dpp::invite::guild_id

Guild ID this invite is for

◆ inviter_id

snowflake dpp::invite::inviter_id

User ID who created this invite

◆ max_age

uint32_t dpp::invite::max_age

Duration (in seconds) after which the invite expires, or 0 for no expiration. Must be between 0 and 604800 (7 days). Defaults to 86400 (1 day)

◆ max_uses

uint32_t dpp::invite::max_uses

Maximum number of uses, or 0 for unlimited. Must be between 0 and 100. Defaults to 0

◆ stage

stage_instance dpp::invite::stage

The stage instance data if there is a public stage instance in the stage channel this invite is for

Deprecated:
Deprecated

◆ target_type

uint8_t dpp::invite::target_type

Target type

◆ target_user_id

snowflake dpp::invite::target_user_id

The user ID whose stream to display for this voice channel stream invite

◆ temporary

bool dpp::invite::temporary

Whether this invite only grants temporary membership

◆ unique

bool dpp::invite::unique

True if this invite should not replace or "attach to" similar invites

◆ uses

uint32_t dpp::invite::uses

How many times this invite has been used

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0