-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbot.php
More file actions
39 lines (31 loc) · 923 Bytes
/
bot.php
File metadata and controls
39 lines (31 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
function get($param){
$url = "return json_decode(file_get_contents($url),1);
}
$update = get("getupdates")["result"];
$x = count($update);
$x = $update[$x - 1];
$id = $x["message"]["chat"]["id"];
$nama = $x["message"]["chat"]["first_name"];
$text = $x["message"]["text"];
if($text == "/help" | $text == "/start"){
$msg = "Selamat Datang $nama,
untuk menggunakan bot ini,
Silahkan kirim link/url Video sosmed yang support untuk bot ini.
Support Link Sosmed :
1. YouTube.
2. Tiktok (Watermark & No Watermark).
3. Instagram.
4. Facebook.
";
$msg = urlencode($msg);
}else{
if(strpos($text,"youtu") != null){$msg = "YouTube "; }
elseif(strpos($text,"tiktok") != null){$msg = "tiktok "; }
elseif(strpos($text,"Instagram") != null){$msg = "Inst "; }
elseif(strpos($text,"facebook") != null){$msg = "Facebook "; }
else{
$msg = " maaf url anda tidak sesuai ";}
}
get("sendMessage?chat_id=$id&text=$msg");
?>