summaryrefslogtreecommitdiff
path: root/discord/channel.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-12-10 03:50:40 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2020-12-10 03:50:40 -0500
commit850b87c1ec0ac1abfc9a3ed5c566bbe98fba9e7c (patch)
treef2e990e7a1a84ffa3f2e825ac7e1380826d7de9e /discord/channel.hpp
parente04545287519123982b7baa9c29dc175d4e35405 (diff)
downloadabaddon-portaudio-850b87c1ec0ac1abfc9a3ed5c566bbe98fba9e7c.tar.gz
abaddon-portaudio-850b87c1ec0ac1abfc9a3ed5c566bbe98fba9e7c.zip
cache channels
Diffstat (limited to 'discord/channel.hpp')
-rw-r--r--discord/channel.hpp36
1 files changed, 18 insertions, 18 deletions
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<PermissionOverwrite> 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<User> 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<Snowflake> GuildID;
+ std::optional<int> Position;
+ std::optional<std::vector<PermissionOverwrite>> PermissionOverwrites; // shouldnt be accessed
+ std::optional<std::string> Name; // null for dm's
+ std::optional<std::string> Topic; // null
+ std::optional<bool> IsNSFW;
+ std::optional<Snowflake> LastMessageID; // null
+ std::optional<int> Bitrate;
+ std::optional<int> UserLimit;
+ std::optional<int> RateLimitPerUser;
+ std::optional<std::vector<User>> Recipients; // only access id
+ std::optional<std::string> Icon; // null
+ std::optional<Snowflake> OwnerID;
+ std::optional<Snowflake> ApplicationID;
+ std::optional<Snowflake> ParentID; // null
+ std::optional<std::string> LastPinTimestamp; // null
friend void from_json(const nlohmann::json &j, Channel &m);
void update_from_json(const nlohmann::json &j);