dpp::invite
dpp::json_interface< invite >
invite.h
struct friend struct json_interface< invite > json_interface< invite > dpp::invite::json_interface< invite > json_interface< invite >
uint32_t uint32_t dpp::invite::approximate_member_count approximate_member_count dpp::invite::approximate_member_count

Approximate number of total users online and offline.

Only returned from cluster::invite_get.

uint32_t uint32_t dpp::invite::approximate_presence_count approximate_presence_count dpp::invite::approximate_presence_count

Approximate number of online users.

Only returned from cluster::invite_get

snowflake snowflake dpp::invite::channel_id channel_id dpp::invite::channel_id

Channel ID this invite is for.

std::string std::string dpp::invite::code code dpp::invite::code

Invite code.

time_t time_t dpp::invite::created_at created_at dpp::invite::created_at

Timestamp at which the invite was created.

channel channel dpp::invite::destination_channel destination_channel dpp::invite::destination_channel

The partial channel this invite is for.

Only filled in retrieved invites.

guild guild dpp::invite::destination_guild destination_guild dpp::invite::destination_guild

The partial guild this invite is for.

Only filled in retrieved invites.

time_t time_t dpp::invite::expires_at expires_at dpp::invite::expires_at

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

Only returned from cluster::invite_get

snowflake snowflake dpp::invite::guild_id guild_id dpp::invite::guild_id

Guild ID this invite is for.

user user dpp::invite::inviter inviter dpp::invite::inviter

User who created this invite.

snowflake snowflake dpp::invite::inviter_id inviter_id dpp::invite::inviter_id

User ID who created this invite.

Deprecated

Use the `inviter` field instead

uint32_t uint32_t dpp::invite::max_age max_age dpp::invite::max_age

Duration (in seconds) after which the invite expires, or 0 for no expiration. Defaults to 86400 (1 day).

Must be between 0 and 604800 (7 days).

uint8_t uint8_t dpp::invite::max_uses max_uses dpp::invite::max_uses

Maximum number of uses, or 0 for unlimited. Defaults to 0.

Must be between 0 and 100.

stage_instance stage_instance dpp::invite::stage stage dpp::invite::stage

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

Deprecated

Deprecated

invite_target_t invite_target_t dpp::invite::target_type target_type dpp::invite::target_type

Target type for this voice channel invite.

snowflake snowflake dpp::invite::target_user_id target_user_id dpp::invite::target_user_id

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

bool bool dpp::invite::temporary temporary dpp::invite::temporary

Whether this invite only grants temporary membership.

bool bool dpp::invite::unique unique dpp::invite::unique

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

uint32_t uint32_t dpp::invite::uses uses dpp::invite::uses

How many times this invite has been used.

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

Read class values from json object j

A json object to read from

A reference to self

json virtual json dpp::invite::to_json_impl (bool with_id=false) const to_json_impl dpp::invite::to_json_impl bool with_id false

Build JSON from this object. with_id

Include ID in JSON

The JSON of the invite

dpp::invite::invite
()
invite
dpp::invite::invite

Constructor.

virtual dpp::invite::~invite
()=default
~invite
dpp::invite::~invite

Destructor.

std::string std::string dpp::json_interface< invite >::build_json (bool with_id=false) const build_json dpp::json_interface< invite >::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

std::string Json built from the structure

invite & invite & dpp::json_interface< invite >::fill_from_json (nlohmann::json *j) fill_from_json dpp::json_interface< invite >::fill_from_json nlohmann::json * j

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

invite & invite & dpp::invite::set_max_age (const uint32_t max_age_) set_max_age 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& reference to self for chaining of calls

invite & invite & dpp::invite::set_max_uses (const uint8_t max_uses_) set_max_uses 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& reference to self for chaining of calls

invite & invite & dpp::invite::set_target_type (const invite_target_t type) set_target_type 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

invite& reference to self for chaining of calls

invite & invite & dpp::invite::set_target_user_id (const snowflake user_id) set_target_user_id dpp::invite::set_target_user_id const snowflake user_id

Set the target user id.

user_id

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

invite& reference to self for chaining of calls

invite & invite & dpp::invite::set_temporary (const bool is_temporary) set_temporary 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& reference to self for chaining of calls

invite & invite & dpp::invite::set_unique (const bool is_unique) set_unique 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

invite& reference to self for chaining of calls

auto auto dpp::json_interface< invite >::to_json (bool with_id=false) const to_json dpp::json_interface< invite >::to_json bool with_id false

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

json Json built from the structure

Represents an invite to a discord guild or channel.

dpp::invite
dpp::json_interface< T >
dpp::json_interface< invite >
< invite >
K
T
auto_archive_duration_t
bool
default_forum_sort_order_t
default_message_notification_t
dpp::channel
CHANNEL_TYPE_MASK
name
rtc_region
topic
recipients
permission_overwrites
available_tags
default_reaction
icon
guild_id
last_message_id
owner_id
parent_id
last_pin_timestamp
permissions
bitrate
default_thread_rate_limit_per_user
flags
position
rate_limit_per_user
default_auto_archive_duration
default_sort_order
user_limit
dpp::forum_tag
name
emoji
moderated
dpp::guild
description
name
vanity_url_code
channels
emojis
roles
threads
voice_members
members
welcome_screen
banner
discovery_splash
icon
splash
afk_channel_id
application_id
owner_id
public_updates_channel_id
rules_channel_id
safety_alerts_channel_id
system_channel_id
widget_channel_id
flags
max_members
max_presences
member_count
flags_extra
premium_subscription_count
shard_id
afk_timeout
max_video_channel_users
default_message_notifications
premium_tier
verification_level
explicit_content_filter
mfa_level
nsfw_level
dpp::invite
code
created_at
expires_at
channel_id
guild_id
inviter_id
target_user_id
destination_guild
destination_channel
inviter
target_type
approximate_member_count
approximate_presence_count
max_age
uses
max_uses
temporary
unique
stage
dpp::json_interface< T >
dpp::json_interface< channel >
< channel >
dpp::json_interface< forum_tag >
< forum_tag >
dpp::json_interface< guild >
< guild >
dpp::json_interface< invite >
< invite >
dpp::json_interface< stage_instance >
< stage_instance >
dpp::json_interface< user >
< user >
dpp::json_interface< voicestate >
< voicestate >
dpp::json_interface< welcome_channel >
< welcome_channel >
dpp::json_interface< welcome_screen >
< welcome_screen >
dpp::managed
id
dpp::permission
value
dpp::permission_overwrite
id
allow
deny
type
dpp::snowflake
value
dpp::stage_instance
channel_id
guild_id
topic
privacy_level
discoverable_disabled
dpp::user
global_name
username
avatar
avatar_decoration
primary_guild
flags
discriminator
refcount
dpp::utility::icon
hash_or_data
dpp::utility::iconhash
first
second
dpp::utility::primaryguild
id
enabled
tag
badge
dpp::voicestate
shard_id
channel_id
guild_id
user_id
session_id
flags
request_to_speak
dpp::welcome_channel
description
emoji_name
channel_id
emoji_id
dpp::welcome_screen
description
welcome_channels
guild_afk_timeout_t
guild_explicit_content_t
guild_nsfw_level_t
guild_premium_tier_t
int32_t
invite_target_t
mfa_level_t
stage_privacy_level
static constexpr uint16_t
std::basic_string< Char >
std::map< K, T >
keys
elements
std::map< dpp::snowflake, dpp::voicestate >
keys
elements
< dpp::snowflake, dpp::voicestate >
std::string
std::unordered_map< K, T >
keys
elements
std::unordered_map< snowflake, guild_member >
< snowflake, guild_member >
variant< std::monostate, dpp::snowflake, std::string >
variant< std::monostate, dpp::utility::iconhash, dpp::utility::image_data >
std::vector< T >
elements
std::vector< dpp::forum_tag >
elements
< dpp::forum_tag >
std::vector< dpp::permission_overwrite >
elements
< dpp::permission_overwrite >
std::vector< dpp::snowflake >
elements
< dpp::snowflake >
std::vector< dpp::welcome_channel >
elements
< dpp::welcome_channel >
time_t
uint16_t
uint32_t
uint64_t
uint8_t
verification_level_t
- dpp::invite
  approximate_member_count
- dpp::invite
  approximate_presence_count
- dpp::invite
  build_json
- dpp::invite
  channel_id
- dpp::invite
  code
- dpp::invite
  created_at
- dpp::invite
  destination_channel
- dpp::invite
  destination_guild
- dpp::invite
  expires_at
- dpp::invite
  fill_from_json
- dpp::invite
  fill_from_json_impl
- dpp::invite
  guild_id
- dpp::invite
  invite
- dpp::invite
  inviter
- dpp::invite
  inviter_id
- dpp::invite
  json_interface< invite >
- dpp::invite
  max_age
- dpp::invite
  max_uses
- dpp::invite
  set_max_age
- dpp::invite
  set_max_uses
- dpp::invite
  set_target_type
- dpp::invite
  set_target_user_id
- dpp::invite
  set_temporary
- dpp::invite
  set_unique
- dpp::invite
  stage
- dpp::invite
  target_type
- dpp::invite
  target_user_id
- dpp::invite
  temporary
- dpp::invite
  to_json
- dpp::invite
  to_json_impl
- dpp::invite
  unique
- dpp::invite
  uses
- dpp::invite
  ~invite