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_user_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
 

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 total users online and offline

◆ approximate_presence_count

uint32_t dpp::invite::approximate_presence_count

Approximate number of online users

◆ channel_id

snowflake dpp::invite::channel_id

Channel id for invite

◆ code

std::string dpp::invite::code

Invite code

◆ expires_at

time_t dpp::invite::expires_at

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

◆ guild_id

snowflake dpp::invite::guild_id

Guild for the invite

◆ inviter_id

snowflake dpp::invite::inviter_id

User ID of invite creator

◆ max_age

uint32_t dpp::invite::max_age

Maximum age (in seconds) of invite

◆ max_uses

uint32_t dpp::invite::max_uses

Maximum number of uses

◆ 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_user_id

snowflake dpp::invite::target_user_id

Target user ID of invite, for invites sent via DM

◆ target_user_type

uint8_t dpp::invite::target_user_type

Target user type (generally this is always 1, "stream")

◆ temporary

bool dpp::invite::temporary

True if a temporary invite which grants access for a limited time

◆ 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

Note
Only set when using cluster::channel_invites_get
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