show news channels

This commit is contained in:
ouwou
2020-11-01 17:15:34 -05:00
parent 77b187bd64
commit 8efa202458
3 changed files with 5 additions and 5 deletions

View File

@@ -134,9 +134,9 @@ std::vector<Snowflake> Guild::GetSortedChannels(Snowflake ignore) const {
for (const auto &channel_id : channels) {
const auto *data = discord.GetChannel(channel_id);
if (data == nullptr) continue;
if (!data->ParentID.IsValid() && data->Type == ChannelType::GUILD_TEXT)
if (!data->ParentID.IsValid() && (data->Type == ChannelType::GUILD_TEXT || data->Type == ChannelType::GUILD_NEWS))
orphan_channels[data->Position].push_back(data);
else if (data->ParentID.IsValid() && data->Type == ChannelType::GUILD_TEXT)
else if (data->ParentID.IsValid() && (data->Type == ChannelType::GUILD_TEXT || data->Type == ChannelType::GUILD_NEWS))
category_to_channels[data->ParentID].push_back(data);
else if (data->Type == ChannelType::GUILD_CATEGORY)
position_to_categories[data->Position].push_back(data);