summaryrefslogtreecommitdiff
path: root/src/discord/objects.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-09-28 20:44:52 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-09-28 20:44:52 -0400
commitd57d822aa9f85ee023e2a50bd525d530b39a7186 (patch)
tree032abe5f62e12657ab06decaca64b3293b307aa5 /src/discord/objects.hpp
parenta79b2d418e1a67b3af034d81fa3df09afc92329e (diff)
downloadabaddon-portaudio-d57d822aa9f85ee023e2a50bd525d530b39a7186.tar.gz
abaddon-portaudio-d57d822aa9f85ee023e2a50bd525d530b39a7186.zip
manage decoders with ssrc updates
Diffstat (limited to 'src/discord/objects.hpp')
-rw-r--r--src/discord/objects.hpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/discord/objects.hpp b/src/discord/objects.hpp
index 0a947d4..14dd20c 100644
--- a/src/discord/objects.hpp
+++ b/src/discord/objects.hpp
@@ -354,8 +354,18 @@ struct SupplementalMergedPresencesData {
friend void from_json(const nlohmann::json &j, SupplementalMergedPresencesData &m);
};
+struct VoiceState;
+struct SupplementalGuildEntry {
+ // std::vector<?> EmbeddedActivities;
+ Snowflake ID;
+ std::vector<VoiceState> VoiceStates;
+
+ friend void from_json(const nlohmann::json &j, SupplementalGuildEntry &m);
+};
+
struct ReadySupplementalData {
SupplementalMergedPresencesData MergedPresences;
+ std::vector<SupplementalGuildEntry> Guilds;
friend void from_json(const nlohmann::json &j, ReadySupplementalData &m);
};
@@ -879,13 +889,6 @@ struct VoiceStateUpdateMessage {
friend void to_json(nlohmann::json &j, const VoiceStateUpdateMessage &m);
};
-struct VoiceStateUpdateData {
- Snowflake UserID;
- std::string SessionID;
-
- friend void from_json(const nlohmann::json &j, VoiceStateUpdateData &m);
-};
-
struct VoiceServerUpdateData {
std::string Token;
Snowflake GuildID;
@@ -894,3 +897,20 @@ struct VoiceServerUpdateData {
friend void from_json(const nlohmann::json &j, VoiceServerUpdateData &m);
};
#endif
+
+struct VoiceState {
+ std::optional<Snowflake> ChannelID;
+ bool IsDeafened;
+ bool IsMuted;
+ std::optional<Snowflake> GuildID;
+ std::optional<GuildMember> Member;
+ bool IsSelfDeafened;
+ bool IsSelfMuted;
+ bool IsSelfVideo;
+ bool IsSelfStream = false;
+ std::string SessionID;
+ bool IsSuppressed;
+ Snowflake UserID;
+
+ friend void from_json(const nlohmann::json &j, VoiceState &m);
+};