summaryrefslogtreecommitdiff
path: root/src/discord/channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord/channel.cpp')
-rw-r--r--src/discord/channel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/discord/channel.cpp b/src/discord/channel.cpp
index dcd3b8f..9d47076 100644
--- a/src/discord/channel.cpp
+++ b/src/discord/channel.cpp
@@ -84,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);
}