diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-28 20:44:52 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-28 20:44:52 -0400 |
commit | d57d822aa9f85ee023e2a50bd525d530b39a7186 (patch) | |
tree | 032abe5f62e12657ab06decaca64b3293b307aa5 /src/discord/objects.cpp | |
parent | a79b2d418e1a67b3af034d81fa3df09afc92329e (diff) | |
download | abaddon-portaudio-d57d822aa9f85ee023e2a50bd525d530b39a7186.tar.gz abaddon-portaudio-d57d822aa9f85ee023e2a50bd525d530b39a7186.zip |
manage decoders with ssrc updates
Diffstat (limited to 'src/discord/objects.cpp')
-rw-r--r-- | src/discord/objects.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/discord/objects.cpp b/src/discord/objects.cpp index 3cdc6b5..21853a7 100644 --- a/src/discord/objects.cpp +++ b/src/discord/objects.cpp @@ -233,6 +233,11 @@ void from_json(const nlohmann::json &j, SupplementalMergedPresencesData &m) { JS_D("friends", m.Friends); } +void from_json(const nlohmann::json &j, SupplementalGuildEntry &m) { + JS_D("id", m.ID); + JS_D("voice_states", m.VoiceStates); +} + void from_json(const nlohmann::json &j, ReadySupplementalData &m) { JS_D("merged_presences", m.MergedPresences); } @@ -658,14 +663,24 @@ void to_json(nlohmann::json &j, const VoiceStateUpdateMessage &m) { // j["d"]["preferred_region"] = m.PreferredRegion; } -void from_json(const nlohmann::json &j, VoiceStateUpdateData &m) { - JS_ON("user_id", m.UserID); - JS_ON("session_id", m.SessionID); -} - void from_json(const nlohmann::json &j, VoiceServerUpdateData &m) { JS_D("token", m.Token); JS_D("guild_id", m.GuildID); JS_D("endpoint", m.Endpoint); } #endif + +void from_json(const nlohmann::json &j, VoiceState &m) { + JS_O("guild_id", m.GuildID); + JS_N("channel_id", m.ChannelID); + JS_D("deaf", m.IsDeafened); + JS_D("mute", m.IsMuted); + JS_D("self_deaf", m.IsSelfDeafened); + JS_D("self_mute", m.IsSelfMuted); + JS_D("self_video", m.IsSelfVideo); + JS_O("self_stream", m.IsSelfStream); + JS_D("suppress", m.IsSuppressed); + JS_D("user_id", m.UserID); + JS_N("member", m.Member); + JS_D("session_id", m.SessionID); +} |