| D++ (DPP) C++ Discord API Bot Library

Search
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:
[legend]
Collaboration diagram for dpp::voice_channel_effect:
[legend]

## 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_effect & | fill_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_effect & | fill_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 | ( |  | ) |

virtual default

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

inline inherited

Convert object to json string.

Parameters

  with_id | Whether 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 | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::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

  j | JSON 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

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether 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

## Friends And Related Symbol Documentation

## ◆ 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.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0