Created
April 22, 2023 11:15
-
-
Save ammarfaizi2/c3be16a6d6f6263c2d9970562f941e52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "tdx.h" | |
namespace tgbot { | |
void clean_pending_requests(Tdx *tdx) | |
{ | |
td_api::object_ptr<td_api::processChatJoinRequests> r; | |
int i = 1550; // number of pending join requests | |
while (i > 0) { | |
r = td_api::make_object<td_api::processChatJoinRequests>(); | |
r->chat_id_ = -1001483770714ll; | |
r->invite_link_ = ""; | |
r->approve_ = false; | |
auto ret = tdx->SendQuerySync(std::move(r)); | |
std::cout << to_string(ret) << std::endl; | |
i -= 100; | |
} | |
} | |
} /* namespace tgbot */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment