Script Wraper
Open in Telegram
Download All New Latest Theme, Plugins, Scripts & Codes Only On "Script Wrap" Stay With "Script Wrap" & Get π πPremium Script πPremium Theme πPremium Plugins πPremium Codes
Show more794
Subscribers
No data24 hours
No data7 days
No data30 days
Posts Archive
π°PHP Auto Kicker Bot codes!
ββββββββββββ
<?php
//edit bellow three things
$botToken = 'bot-token-here';
$botusername = 'bot-username-without-@';
$webhookUrl = 'webhook-url';
//no need to edit bellow
$update = file_get_contents('php://input');
$updateData = json_decode($update, true);
if (isset($updateData['message'])) {
$chatId = $updateData['message']['chat']['id'];
$userId = $updateData['message']['from']['id'];
$messageText = $updateData['message']['text'];
if ($messageText === '/start') {
$keyboard = [
'inline_keyboard' => [
[
['text' => 'Add to Channel', 'url' => 'https://t.me/'.$botusername.'?startgroup=invite_to_channel']
]
]
];
$keyboard = json_encode($keyboard);
$welcomeMessage = "Hello! *UserFirstName*, welcome to Auto Kicker Bot. I can ban users who leave your channel. Just add me to your channel and make me an admin with ban user rights!";
$welcomeMessage = str_replace('*UserFirstName*', $updateData['message']['from']['first_name'], $welcomeMessage);
$apiRequest = [
'chat_id' => $chatId,
'text' => $welcomeMessage,
'parse_mode' => 'Markdown',
'reply_markup' => $keyboard
];
file_get_contents('https://api.telegram.org/bot' . $botToken . '/sendMessage?' . http_build_query($apiRequest));
}
}
if (isset($updateData['chat_member']) && $updateData['chat_member']['new_chat_member']['status'] === 'left') {
$chatId = $updateData['chat_member']['chat']['id'];
$userId = $updateData['chat_member']['from']['id'];
$apiRequest = [
'chat_id' => $chatId,
'user_id' => $userId
];
file_get_contents('https://api.telegram.org/bot' . $botToken . '/banChatMember?' . http_build_query($apiRequest));
}
$setWebhookRequest = [
'url' => $webhookUrl,
'allowed_updates' => json_encode(['message', 'chat_member', 'left_chat_member'])
];
file_get_contents('https://api.telegram.org/bot' . $botToken . '/setWebhook?' . http_build_query($setWebhookRequest));
?>
ββββββββββββ
π How to setup this Bot?
1. create new autokickerbot.php file in your 000webhost website filemanger!
2. Now paste codes and edit the three thing which at top of codes!
3. Run that file once to activate with telegram bot!
Above is short tutorial on using above php in 000webhost! *3rd step is important
ββββββββββββ
πCredit: No Need to Give
πPublish By: @ajinkyalinkπ°PHP Auto Approve Bot codes!
ββββββββββββ
<?php
//edit this three things
$token = 'your-bot-token';
$botUsername = 'your-bot-username';
$webhookUrl = 'https://your-domain-here.com/autoapprovebot.php';
//no need to edit bellow
$apiUrl = "https://api.telegram.org/bot$token/";
$allowedUpdates = ['message', 'chat_member', 'chat_join_request'];
$method = "setWebhook?url=$webhookUrl&allowed_updates=" . json_encode($allowedUpdates);
file_get_contents($apiUrl . $method);
$data = json_decode(file_get_contents('php://input'), true);
if (isset($data['message']['text']) && $data['message']['text'] == '/start') {
$userId = $data['message']['chat']['id'];
$userFirstName = $data['message']['chat']['first_name'];
$message = "Hello! *$userFirstName* welcome to Auto Approve Bot! I can manage your channel join request easily, just add me to your channel or group and make me admin!";
$keyboard = [
'inline_keyboard' => [
[
['text' => 'Add Bot to Channel', 'url' => "https://t.me/$botUsername?startgroup"]
]
]
];
$encodedKeyboard = json_encode($keyboard);
$apiUrl = "https://api.telegram.org/bot$token/";
$method = "sendMessage?chat_id=$userId&text=$message&parse_mode=Markdown&reply_markup=$encodedKeyboard";
file_get_contents($apiUrl . $method);
} elseif (isset($data['chat_join_request'])) {
$chatId = $data['chat_join_request']['chat']['id'];
$userId = $data['chat_join_request']['from']['id'];
$userFirstName = $data['chat_join_request']['from']['first_name'];
$channelTitle = $data['chat_join_request']['chat']['title'];
$apiUrl = "https://api.telegram.org/bot$token/";
$method = "approveChatJoinRequest?chat_id=$chatId&user_id=$userId";
file_get_contents($apiUrl . $method);
$message = "Hello! *$userFirstName* your join request for *$channelTitle* has been accepted!";
$apiUrl = "https://api.telegram.org/bot$token/";
$method = "sendMessage?chat_id=$userId&text=$message&parse_mode=Markdown";
file_get_contents($apiUrl . $method);
}
?>
ββββββββββββ
π How to setup this Bot?
1. create new autoapprovebot.php file in your 000webhost website filemanger!
2. Now paste codes and edit the three thing which at top of codes!
3. Run that file once to activate with telegram bot!
Above is short tutorial on using above php in 000webhost! *3rd step is important
ββββββββββββ
πCredit: No Need to Give
πPublish By: @ajinkyalinkTry This Guys - https://github.com/KaranCoder1/Auto-Request-Accept-Bot
Pyrogram Auto chat Request Approval
Try This Guys - https://github.com/KaranCoder1/Auto-Request-Accept-Bot
Pyrogram Auto chat Request Approval
πΌ Chat GPT Bot's Code.
π¬ Command:
Your Command
π» Answer: π§£ _Send Your Query!_
πWait for Answer On β
π Bjs:
Api.sendChatAction({
chat_id: user.telegramid,
action: "typing"
})
HTTP.get({
url:
"https://chatgpt.apinepdev.workers.dev/?question=" +
encodeURIComponent(message),
success: "/onSuccess"
})
β£οΈCommand: /onSuccess
π BJs:
var data = JSON.parse(content)
var ans = data.answer
if (!ans) {
Api.sendChatAction({
chat_id: user.telegramid,
action: "typing"
})
Bot.sendMessage("β Something Went Wrong. ")
return
}
Api.sendChatAction({
chat_id: user.telegramid,
action: "typing"
})
Bot.sendMessage(ans)
βοΈ Api By: @Prime_Nepcoder
βοΈ Coded By - @CoderSwastik
Β© Copying and publishing code anywhere or selling the above code is strictly not allowed. Right of the above codes belong to the code owner and owner of the this channel. Still if anyone have any problem regarding copyright can contact us.β
Per Referral - 2000 SHIB
βΆοΈ Join - https://t.me/EmmanuelShibaInubot?start=5337150824
π @MeTestKarRahaHuBot
Guys please just start the bot! Atleast 250 users starts need!
