diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-03-26 02:58:59 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-03-26 02:58:59 -0400 |
commit | a0b3c9f8a4f8d2c39258d4c142f8604423576d91 (patch) | |
tree | 841155a65b439b61a5c58c1f64878152c20d4f51 /src/discord/channel.cpp | |
parent | 481685b3bbb2b0270870dec5de87e60fc2d84d15 (diff) | |
parent | a2a45757e917aa97e71cf0b84a01dc843759a5f6 (diff) | |
download | abaddon-portaudio-a0b3c9f8a4f8d2c39258d4c142f8604423576d91.tar.gz abaddon-portaudio-a0b3c9f8a4f8d2c39258d4c142f8604423576d91.zip |
Merge branch 'master' into msys
Diffstat (limited to 'src/discord/channel.cpp')
-rw-r--r-- | src/discord/channel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/discord/channel.cpp b/src/discord/channel.cpp index 2f5c3c1..9d47076 100644 --- a/src/discord/channel.cpp +++ b/src/discord/channel.cpp @@ -13,6 +13,8 @@ void from_json(const nlohmann::json &j, ThreadMemberObject &m) { JS_O("user_id", m.UserID); JS_D("join_timestamp", m.JoinTimestamp); JS_D("flags", m.Flags); + JS_O("muted", m.IsMuted); + JS_ON("mute_config", m.MuteConfig); } void from_json(const nlohmann::json &j, ChannelData &m) { @@ -82,6 +84,14 @@ bool ChannelData::IsCategory() const noexcept { return Type == ChannelType::GUILD_CATEGORY; } +bool ChannelData::HasIcon() const noexcept { + return Icon.has_value(); +} + +std::string ChannelData::GetIconURL() const { + return "https://cdn.discordapp.com/channel-icons/" + std::to_string(ID) + "/" + *Icon + ".png"; +} + std::vector<Snowflake> ChannelData::GetChildIDs() const { return Abaddon::Get().GetDiscordClient().GetChildChannelIDs(ID); } |