diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-12-14 03:05:16 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-12-14 03:05:16 -0500 |
commit | 22578921b9e577c669cd57385df48cfc08fa90eb (patch) | |
tree | c4a70fa7eb2682e5380e0411df857dd854993fec /discord/objects.hpp | |
parent | 33ed25b2f66e727911182f1552aa8abfd558c69e (diff) | |
download | abaddon-portaudio-22578921b9e577c669cd57385df48cfc08fa90eb.tar.gz abaddon-portaudio-22578921b9e577c669cd57385df48cfc08fa90eb.zip |
pretend to be a real client a little better
Diffstat (limited to 'discord/objects.hpp')
-rw-r--r-- | discord/objects.hpp | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/discord/objects.hpp b/discord/objects.hpp index 8651068..2213ba5 100644 --- a/discord/objects.hpp +++ b/discord/objects.hpp @@ -146,21 +146,23 @@ struct UpdateStatusMessage { std::vector<Activity> Activities; // null (but never sent as such) std::string Status; bool IsAFK; + int Since = 0; friend void to_json(nlohmann::json &j, const UpdateStatusMessage &m); }; struct ReadyEventData { - int GatewayVersion; // - User User; // - std::vector<Guild> Guilds; // - std::string SessionID; // - std::vector<Channel> PrivateChannels; // + int GatewayVersion; + User SelfUser; + std::vector<Guild> Guilds; + std::string SessionID; + std::vector<Channel> PrivateChannels; // undocumented - std::string AnalyticsToken; // opt - int FriendSuggestionCount; // opt - UserSettings UserSettings; // opt + std::optional<std::vector<User>> Users; + std::optional<std::string> AnalyticsToken; + std::optional<int> FriendSuggestionCount; + UserSettings UserSettings; // std::vector<Unknown> ConnectedAccounts; // opt // std::map<std::string, Unknown> Consents; // opt // std::vector<Unknown> Experiments; // opt @@ -179,15 +181,36 @@ struct IdentifyProperties { std::string OS; std::string Browser; std::string Device; + std::string BrowserUserAgent; + std::string BrowserVersion; + std::string OSVersion; + std::string Referrer; + std::string ReferringDomain; + std::string ReferrerCurrent; + std::string ReferringDomainCurrent; + std::string ReleaseChannel; + int ClientBuildNumber; + std::string ClientEventSource; // empty -> null friend void to_json(nlohmann::json &j, const IdentifyProperties &m); }; +struct ClientStateProperties { + std::map<std::string, std::string> GuildHashes; + std::string HighestLastMessageID = "0"; + int ReadStateVersion = 0; + int UserGuildSettingsVersion = -1; + + friend void to_json(nlohmann::json &j, const ClientStateProperties &m); +}; + struct IdentifyMessage : GatewayMessage { std::string Token; IdentifyProperties Properties; + UpdateStatusMessage Presence; + ClientStateProperties ClientState; bool DoesSupportCompression = false; - int LargeThreshold = 0; + int Capabilities; friend void to_json(nlohmann::json &j, const IdentifyMessage &m); }; |