From 850b87c1ec0ac1abfc9a3ed5c566bbe98fba9e7c Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 10 Dec 2020 03:50:40 -0500 Subject: cache channels --- discord/channel.hpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'discord/channel.hpp') diff --git a/discord/channel.hpp b/discord/channel.hpp index 178f8b6..5f8e5e3 100644 --- a/discord/channel.hpp +++ b/discord/channel.hpp @@ -17,24 +17,24 @@ enum class ChannelType : int { }; struct Channel { - Snowflake ID; // - ChannelType Type; // - Snowflake GuildID; // opt - int Position = -1; // opt - std::vector PermissionOverwrites; // opt - std::string Name; // opt, null (null for dm's) - std::string Topic; // opt, null - bool IsNSFW = false; // opt - Snowflake LastMessageID; // opt, null - int Bitrate = 0; // opt - int UserLimit = 0; // opt - int RateLimitPerUser = 0; // opt - std::vector Recipients; // opt - std::string Icon; // opt, null - Snowflake OwnerID; // opt - Snowflake ApplicationID; // opt - Snowflake ParentID; // opt, null - std::string LastPinTimestamp; // opt, can be null even tho docs say otherwise + Snowflake ID; + ChannelType Type; + std::optional GuildID; + std::optional Position; + std::optional> PermissionOverwrites; // shouldnt be accessed + std::optional Name; // null for dm's + std::optional Topic; // null + std::optional IsNSFW; + std::optional LastMessageID; // null + std::optional Bitrate; + std::optional UserLimit; + std::optional RateLimitPerUser; + std::optional> Recipients; // only access id + std::optional Icon; // null + std::optional OwnerID; + std::optional ApplicationID; + std::optional ParentID; // null + std::optional LastPinTimestamp; // null friend void from_json(const nlohmann::json &j, Channel &m); void update_from_json(const nlohmann::json &j); -- cgit v1.2.3