From 51cf8fd2df3cf7a602d05540627a5ad8af6baa58 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 9 Sep 2020 23:17:26 -0400 Subject: rename and reorder a bunch of discord stuff --- discord/channel.hpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 discord/channel.hpp (limited to 'discord/channel.hpp') diff --git a/discord/channel.hpp b/discord/channel.hpp new file mode 100644 index 0000000..78246f6 --- /dev/null +++ b/discord/channel.hpp @@ -0,0 +1,39 @@ +#pragma once +#include "snowflake.hpp" +#include "json.hpp" +#include "user.hpp" +#include +#include + +enum class ChannelType : int { + GUILD_TEXT = 0, + DM = 1, + GUILD_VOICE = 2, + GROUP_DM = 3, + GUILD_CATEGORY = 4, + GUILD_NEWS = 5, + GUILD_STORE = 6, +}; + +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 + + friend void from_json(const nlohmann::json &j, Channel &m); +}; -- cgit v1.2.3