D++ (DPP)
C++ Discord API Bot Library
|
Represents an invite to a discord guild or channel. More...
#include <invite.h>
Public Member Functions | |
invite () | |
virtual | ~invite ()=default |
invite & | fill_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 |
Represents an invite to a discord guild or channel.
dpp::invite::invite | ( | ) |
Constructor
|
virtualdefault |
Destructor
|
virtual |
Build JSON from this object.
with_id | Include ID in JSON |
Reimplemented from dpp::json_interface< invite >.
invite & dpp::invite::fill_from_json | ( | nlohmann::json * | j | ) |
Read class values from json object
j | A json object to read from |
uint32_t dpp::invite::approximate_member_count |
Approximate number of total users online and offline
uint32_t dpp::invite::approximate_presence_count |
Approximate number of online users
snowflake dpp::invite::channel_id |
Channel ID this invite is for
std::string dpp::invite::code |
Invite code
time_t dpp::invite::created_at |
Timestamp at which the invite was created
time_t dpp::invite::expires_at |
Readonly expiration timestamp of this invite or 0 if the invite doesn't expire
snowflake dpp::invite::guild_id |
Guild ID this invite is for
snowflake dpp::invite::inviter_id |
User ID who created this invite
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)
uint32_t dpp::invite::max_uses |
Maximum number of uses, or 0 for unlimited. Must be between 0 and 100. Defaults to 0
stage_instance dpp::invite::stage |
The stage instance data if there is a public stage instance in the stage channel this invite is for
uint8_t dpp::invite::target_type |
Target type
snowflake dpp::invite::target_user_id |
The user ID whose stream to display for this voice channel stream invite
bool dpp::invite::temporary |
Whether this invite only grants temporary membership
bool dpp::invite::unique |
True if this invite should not replace or "attach to" similar invites
uint32_t dpp::invite::uses |
How many times this invite has been used