summaryrefslogtreecommitdiff
path: root/discord/channel.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-07-26 02:10:56 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-07-26 02:10:56 -0400
commitede2f53ba537d13aca3f37ba4029166f780414a2 (patch)
tree5b8cb14f7097222b210d4733493192d6bb06fd7e /discord/channel.cpp
parentea9dd29721da8c8bef126462c2ee4fd1e53d7edc (diff)
parentdf243a40b5febcf7b9834e66f0ade770c3b483a0 (diff)
downloadabaddon-portaudio-ede2f53ba537d13aca3f37ba4029166f780414a2.tar.gz
abaddon-portaudio-ede2f53ba537d13aca3f37ba4029166f780414a2.zip
Merge branch 'channels-list'
Diffstat (limited to 'discord/channel.cpp')
-rw-r--r--discord/channel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/channel.cpp b/discord/channel.cpp
index 68e73e9..9d90eb5 100644
--- a/discord/channel.cpp
+++ b/discord/channel.cpp
@@ -43,6 +43,10 @@ void ChannelData::update_from_json(const nlohmann::json &j) {
JS_RD("last_pin_timestamp", LastPinTimestamp);
}
+bool ChannelData::NSFW() const {
+ return IsNSFW.has_value() && *IsNSFW;
+}
+
std::optional<PermissionOverwrite> ChannelData::GetOverwrite(Snowflake id) const {
return Abaddon::Get().GetDiscordClient().GetPermissionOverwrite(ID, id);
}