From 989ec06838b2f8e5a90808eacb97aefe2890df6c Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 24 Jun 2021 14:31:50 -0400 Subject: change how client determines if verification is needed (#28) --- discord/discord.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'discord/discord.cpp') diff --git a/discord/discord.cpp b/discord/discord.cpp index ef93360..3641cb5 100644 --- a/discord/discord.cpp +++ b/discord/discord.cpp @@ -872,6 +872,13 @@ void DiscordClient::FetchUserRelationships(Snowflake user_id, sigc::slotIsPending.has_value()) + return *member->IsPending; + return false; +} + void DiscordClient::GetVerificationGateInfo(Snowflake guild_id, sigc::slot)> callback) { m_http.MakeGET("/guilds/" + std::to_string(guild_id) + "/member-verification", [this, callback](const http::response_type &response) { if (!CheckCode(response)) return; @@ -1184,6 +1191,11 @@ void DiscordClient::ProcessNewGuild(GuildData &guild) { } void DiscordClient::HandleGatewayReady(const GatewayMessage &msg) { + auto fp = std::fopen("ready.json", "w"); + auto cum = msg.Data.dump(4); + std::fwrite(cum.c_str(), 1, cum.size(), fp); + std::fclose(fp); + m_ready_received = true; ReadyEventData data = msg.Data; for (auto &g : data.Guilds) -- cgit v1.2.3