diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-13 02:35:02 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-13 02:35:02 -0400 |
commit | 99597a80d2eb9752882791d458036c2c17969767 (patch) | |
tree | 653aafc326b79875c9117b29b8c4ca5407b3023e /discord/objects.hpp | |
parent | c17842c16f10f55f2f0923e94033a482ef98838e (diff) | |
download | abaddon-portaudio-99597a80d2eb9752882791d458036c2c17969767.tar.gz abaddon-portaudio-99597a80d2eb9752882791d458036c2c17969767.zip |
add PRESENCE_UPDATE handling (for user object only)
Diffstat (limited to 'discord/objects.hpp')
-rw-r--r-- | discord/objects.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/discord/objects.hpp b/discord/objects.hpp index 602991b..3b4491c 100644 --- a/discord/objects.hpp +++ b/discord/objects.hpp @@ -36,6 +36,7 @@ enum class GatewayEvent : int { GUILD_DELETE, MESSAGE_DELETE_BULK, GUILD_MEMBER_UPDATE, + PRESENCE_UPDATE, }; struct GatewayMessage { @@ -201,3 +202,21 @@ struct GuildMemberUpdateMessage { friend void from_json(const nlohmann::json &j, GuildMemberUpdateMessage &m); }; + +struct ClientStatus { + std::string Desktop; // opt + std::string Mobile; // opt + std::string Web; // opt + + friend void from_json(const nlohmann::json &j, ClientStatus &m); +}; + +struct PresenceUpdateMessage { + nlohmann::json User; // the client updates an existing object from this data + Snowflake GuildID; + std::string Status; + // std::vector<Activity> Activities; + ClientStatus ClientStatus; + + friend void from_json(const nlohmann::json &j, PresenceUpdateMessage &m); +}; |