Skip to content

Instantly share code, notes, and snippets.

@ammarfaizi2
Created April 22, 2023 11:15
Show Gist options
  • Save ammarfaizi2/c3be16a6d6f6263c2d9970562f941e52 to your computer and use it in GitHub Desktop.
Save ammarfaizi2/c3be16a6d6f6263c2d9970562f941e52 to your computer and use it in GitHub Desktop.
#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