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_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 |
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 total users online and offline
uint32_t dpp::invite::approximate_presence_count |
Approximate number of online users
snowflake dpp::invite::channel_id |
Channel id for invite
std::string dpp::invite::code |
Invite code
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 for the invite
snowflake dpp::invite::inviter_id |
User ID of invite creator
uint32_t dpp::invite::max_age |
Maximum age (in seconds) of invite
uint32_t dpp::invite::max_uses |
Maximum number of uses
stage_instance dpp::invite::stage |
The stage instance data if there is a public stage instance in the stage channel this invite is for
snowflake dpp::invite::target_user_id |
Target user ID of invite, for invites sent via DM
uint8_t dpp::invite::target_user_type |
Target user type (generally this is always 1, "stream")
bool dpp::invite::temporary |
True if a temporary invite which grants access for a limited time
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