From 15954830e278007fc8da209944d4422240d65ecc Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 10 Dec 2021 03:26:33 -0500 Subject: hide guild unread indicator for muted guilds --- src/discord/objects.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/discord/objects.hpp') diff --git a/src/discord/objects.hpp b/src/discord/objects.hpp index 28331c3..8afbc19 100644 --- a/src/discord/objects.hpp +++ b/src/discord/objects.hpp @@ -243,6 +243,39 @@ struct ReadStateData { friend void from_json(const nlohmann::json &j, ReadStateData &m); }; +struct UserGuildSettingsChannelOverride { + bool Muted; + // MuteConfig + int MessageNotifications; + bool Collapsed; + Snowflake ChannelID; + + friend void from_json(const nlohmann::json &j, UserGuildSettingsChannelOverride &m); +}; + +struct UserGuildSettingsEntry { + int Version; + bool SuppressRoles; + bool SuppressEveryone; + bool Muted; + // MuteConfig + bool MobilePush; + int MessageNotifications; + bool HideMutedChannels; + Snowflake GuildID; + std::vector ChannelOverrides; + + friend void from_json(const nlohmann::json &j, UserGuildSettingsEntry &m); +}; + +struct UserGuildSettingsData { + int Version; + bool IsParital; + std::vector Entries; + + friend void from_json(const nlohmann::json &j, UserGuildSettingsData &m); +}; + struct ReadyEventData { int GatewayVersion; UserData SelfUser; @@ -259,6 +292,7 @@ struct ReadyEventData { std::optional> Relationships; std::optional> GuildJoinRequests; ReadStateData ReadState; + UserGuildSettingsData GuildSettings; // std::vector ConnectedAccounts; // opt // std::map Consents; // opt // std::vector Experiments; // opt -- cgit v1.2.3