mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 14:10:10 +00:00
make dm member lists a bit better
This commit is contained in:
parent
9fa59479aa
commit
0f47728c2a
@ -105,6 +105,7 @@ void MemberList::UpdateMemberListInternal() {
|
||||
if (chan->Type == ChannelType::DM || chan->Type == ChannelType::GROUP_DM) {
|
||||
for (const auto &user : chan->Recipients)
|
||||
ids.insert(user.ID);
|
||||
ids.insert(discord.GetUserData().ID);
|
||||
} else {
|
||||
ids = discord.GetUsersInGuild(m_guild_id);
|
||||
}
|
||||
@ -203,7 +204,10 @@ void MemberList::UpdateMemberListInternal() {
|
||||
add_user(data);
|
||||
}
|
||||
|
||||
add_role("@everyone");
|
||||
if (chan->Type == ChannelType::DM || chan->Type == ChannelType::GROUP_DM)
|
||||
add_role("Users");
|
||||
else
|
||||
add_role("@everyone");
|
||||
for (const auto &id : roleless_users) {
|
||||
const auto *user = discord.GetUser(id);
|
||||
if (user != nullptr)
|
||||
|
@ -591,6 +591,8 @@ void DiscordClient::HandleGatewayReady(const GatewayMessage &msg) {
|
||||
|
||||
for (const auto &dm : data.PrivateChannels) {
|
||||
m_store.SetChannel(dm.ID, dm);
|
||||
for (const auto &recipient : dm.Recipients)
|
||||
m_store.SetUser(recipient.ID, recipient);
|
||||
}
|
||||
|
||||
m_signal_gateway_ready.emit();
|
||||
|
Loading…
Reference in New Issue
Block a user