![]() |
D++ (DPP)
C++ Discord API Bot Library
|
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 |
| virtual std::string | build_json (bool with_id=false) const |
| invite & | fill_from_json (nlohmann::json *j) |
| invite & | set_max_age (const uint32_t max_age_) |
| Set the max age after which the invite expires. More... | |
| invite & | set_max_uses (const uint8_t max_uses_) |
| Set the maximum number of uses for this invite. More... | |
| invite & | set_target_type (const invite_target_t type) |
| Set the target type for this voice channel invite. More... | |
| invite & | set_target_user_id (const snowflake user_id) |
| Set the target user id. More... | |
| invite & | set_temporary (const bool is_temporary) |
| Set temporary property of this invite object. More... | |
| invite & | set_unique (const bool is_unique) |
| Set unique property of this invite object. More... | |
Public Attributes | |
| uint32_t | approximate_member_count |
| uint32_t | approximate_presence_count |
| snowflake | channel_id |
| std::string | code |
| time_t | created_at |
| channel | destination_channel |
| guild | destination_guild |
| time_t | expires_at |
| snowflake | guild_id |
| user | inviter |
| snowflake | inviter_id |
| uint32_t | max_age |
| uint8_t | max_uses |
| stage_instance | stage |
| invite_target_t | target_type |
| snowflake | target_user_id |
| bool | temporary |
| bool | unique |
| uint32_t | uses |
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 |
| invite & dpp::invite::set_max_age | ( | const uint32_t | max_age_ | ) |
Set the max age after which the invite expires.
| max_age_ | The duration in seconds, or 0 for no expiration. Must be between 0 and 604800 (7 days) |
| invite & dpp::invite::set_max_uses | ( | const uint8_t | max_uses_ | ) |
Set the maximum number of uses for this invite.
| max_uses_ | Maximum number of uses, or 0 for unlimited. Must be between 0 and 100 |
| invite & dpp::invite::set_target_type | ( | const invite_target_t | type | ) |
Set the target type for this voice channel invite.
| type | invite_target_t Target type |
Set the target user id.
| user_id | The user ID whose stream to display for this voice channel stream invite |
| invite & dpp::invite::set_temporary | ( | const bool | is_temporary | ) |
Set temporary property of this invite object.
| is_temporary | Whether this invite only grants temporary membership |
| invite & dpp::invite::set_unique | ( | const bool | is_unique | ) |
Set unique property of this invite object.
| is_unique | True if this invite should not replace or "attach to" similar invites |
| 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
| channel dpp::invite::destination_channel |
The partial channel this invite is for. Only filled in retrieved invites
| guild dpp::invite::destination_guild |
The partial guild this invite is for. Only filled in retrieved invites
| 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
| user dpp::invite::inviter |
User who created this invite
| snowflake dpp::invite::inviter_id |
User ID who created this invite
inviter field instead | 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)
| uint8_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
| invite_target_t dpp::invite::target_type |
Target type for this voice channel invite
| 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