will present the rules to new group members and they need to write /agree to actually get access to the group. Is this even possible? I got already a basic VPS with Python running and got some bot actually presenting the rules when message directly, but thats it
there are couple ways to solve this
You can use join request links, and use approveChatJoinRequest when you receive the /agree command
Is there a basic code tutorial to achieve this?
first start learning how to code
if You can use a library like PHPBot, you can check the below snippet. <?php require_once __DIR__ . "/vendor/autoload.php"; use kyle2142\PHPBot; use kyle2142\TelegramException; $content = file_get_contents("php://input"); $update = json_decode($content, TRUE); $bot = new PHPBot("123456:ADGIKBCTU"); if (array_key_exists("chat_join_request", $update)) { $bot->api->sendMessage([ "chat_id" => $update["chat_join_request"]["user_chat_id"], "text" => "rules message here", "reply_markup" => json_encode([ "inline_keyboard" => [ [ [ "text" => "/agree", "callback_data" => $update["chat_join_request"]["chat"]["id"] ] ] ] ]) ]); } if (array_key_exists("callback_query", $update)) { $bot->api->answerCallbackQuery([ "callback_query_id" => $update["callback_query"]["id"] ]); $bot->api->approveChatJoinRequest([ "chat_id" => $update["callback_query"]["data"], "user_id" => $update["callback_query"]["from"]["id"] ]); }
so I put this into a PHP file (same folder) along with PHPBot.php composer.json And run it with installed php parser?
будешь терпеть сидеть здесь колымага ебанная твоя мать шлюха
Checkout phptherightway.com if you have never used or just starting to use PHP.
Use python if you are starting
Ты вообще вафля сума сошел?
It is a good language lol.
ты на моем хую тусишься очком своим как дом при взрыве ты же понимаешь что твоя мамаша всем дает, она такая проебанная шлюха ,что уже не за деньги ебется, а за спасибо
I just wanted to a quick working script I will teach myself the details if I need it 😂
I am a ruby user. Even I am beginner to python
for simple parser scripts?
Будешь своей жопой крутить и будут тебя ебать всё туда
js - second shit
Тебе даже если вьeбать хуже не станет
what languages do you like then
Обсуждают сегодня