proper member list in threads

This commit is contained in:
ouwou
2021-08-20 01:13:51 -04:00
parent 1fa3e5beac
commit 2a45d7173a
6 changed files with 96 additions and 10 deletions

View File

@@ -127,7 +127,12 @@ void MemberList::UpdateMemberList() {
return;
}
auto ids = discord.GetUsersInGuild(m_guild_id);
std::set<Snowflake> ids;
if (chan->IsThread()) {
const auto x = discord.GetUsersInThread(m_chan_id);
ids = { x.begin(), x.end() };
} else
ids = discord.GetUsersInGuild(m_guild_id);
// process all the shit first so its in proper order
std::map<int, RoleData> pos_to_role;