add option to remove user from group dm in menu

also fix a crash when opening empty group dms
This commit is contained in:
ouwou
2021-02-18 12:45:14 -05:00
parent 614c6ea595
commit 4df9b148e2
4 changed files with 35 additions and 1 deletions

View File

@@ -522,6 +522,12 @@ void DiscordClient::DeleteInvite(const std::string &code, sigc::slot<void(bool s
});
}
void DiscordClient::RemoveGroupDMRecipient(Snowflake channel_id, Snowflake user_id) {
m_http.MakeDELETE("/channels/" + std::to_string(channel_id) + "/recipients/" + std::to_string(user_id), [this](const http::response_type &response) {
CheckCode(response);
});
}
std::vector<BanData> DiscordClient::GetBansInGuild(Snowflake guild_id) {
return m_store.GetBans(guild_id);
}