D++ (DPP)
C++ Discord API Bot Library
Loading...
Searching...
No Matches
dpp::voice_channel_effect Class Reference

Represents a voice channel effect e.g. a soundboard sound or an emoji reaction. More...

#include <voice_channel_effect.h>

Inheritance diagram for dpp::voice_channel_effect:
Collaboration diagram for dpp::voice_channel_effect:

Public Member Functions

 voice_channel_effect ()
 Construct a new voice_channel_effect object.
virtual ~voice_channel_effect ()=default
 Destroy the voice_channel_effect object.
std::string build_json (bool with_id=false) const
 Convert object to json string.
voice_channel_effectfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json.
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json.

Public Attributes

uint32_t animation_id {0}
 The ID of the emoji animation, for emoji reaction and soundboard effects.
uint8_t animation_type {0}
 The type of emoji animation, for emoji reaction and soundboard effects.
snowflake channel_id {0}
 The channel id the user who sent the effect is connected to.
dpp::emoji emoji
 The emoji of the voice channel effect.
snowflake guild_id {0}
 The guild id with the channel this effect was sent in.
int32_t shard_id {0}
 Owning shard.
snowflake sound_id {0}
 The ID of the soundboard sound, for soundboard effects.
double sound_volume {0}
 The volume of the soundboard sound, from 0 to 1, for soundboard effects.
snowflake user_id {0}
 The user id who sent the effect.

Protected Member Functions

voice_channel_effectfill_from_json_impl (nlohmann::json *j)
 Fill voice channel effect object from json data.

Friends

struct json_interface< voice_channel_effect >

Detailed Description

Represents a voice channel effect e.g. a soundboard sound or an emoji reaction.

Constructor & Destructor Documentation

◆ voice_channel_effect()

dpp::voice_channel_effect::voice_channel_effect ( )

Construct a new voice_channel_effect object.

◆ ~voice_channel_effect()

virtual dpp::voice_channel_effect::~voice_channel_effect ( )
virtualdefault

Destroy the voice_channel_effect object.

Member Function Documentation

◆ build_json()

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

Convert object to json string.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
std::string Json built from the structure

◆ fill_from_json()

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

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

◆ fill_from_json_impl()

voice_channel_effect & dpp::voice_channel_effect::fill_from_json_impl ( nlohmann::json * j)
protected

Fill voice channel effect object from json data.

Parameters
jJSON data to fill from
Returns
voice_channel_effect& Reference to self

◆ to_json()

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

Convert object to nlohmann::json.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
json Json built from the structure

◆ json_interface< voice_channel_effect >

friend struct json_interface< voice_channel_effect >
friend

Member Data Documentation

◆ animation_id

uint32_t dpp::voice_channel_effect::animation_id {0}

The ID of the emoji animation, for emoji reaction and soundboard effects.

Note
This may be empty.

◆ animation_type

uint8_t dpp::voice_channel_effect::animation_type {0}

The type of emoji animation, for emoji reaction and soundboard effects.

Note
This may be empty.

◆ channel_id

snowflake dpp::voice_channel_effect::channel_id {0}

The channel id the user who sent the effect is connected to.

◆ emoji

dpp::emoji dpp::voice_channel_effect::emoji

The emoji of the voice channel effect.

◆ guild_id

snowflake dpp::voice_channel_effect::guild_id {0}

The guild id with the channel this effect was sent in.

◆ shard_id

int32_t dpp::voice_channel_effect::shard_id {0}

Owning shard.

◆ sound_id

snowflake dpp::voice_channel_effect::sound_id {0}

The ID of the soundboard sound, for soundboard effects.

Note
This may be empty.

◆ sound_volume

double dpp::voice_channel_effect::sound_volume {0}

The volume of the soundboard sound, from 0 to 1, for soundboard effects.

Note
This may be empty.

◆ user_id

snowflake dpp::voice_channel_effect::user_id {0}

The user id who sent the effect.

D++ 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