-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlaceHolder.php
More file actions
38 lines (38 loc) · 1.5 KB
/
Copy pathPlaceHolder.php
File metadata and controls
38 lines (38 loc) · 1.5 KB
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
<?php
error_reporting(0);
set_time_limit(0);
ob_start();
if(!file_exists("iTelegram.php")){
copy('https://raw.githubusercontent.com/iNeoTeam/iTelegram/main/iTelegram.php', 'iTelegram.php');
}
require_once('iTelegram.php');
use iTelegram\Bot;
define('API_KEY', "BOT_HTTP_ACCESS_TOKEN");
$bot = new Bot();
$bot->Authentification(API_KEY);
$text = strtolower($bot->Text());
$chat_id = $bot->getChatId();
$username = $bot->getChatUsername();
$firstname = $bot->getChatFirstname();
$message_id = $bot->MessageId();
$list = array(
"سلام",
"خوبی؟",
"آی نئو تیم",
"Powered By iNeoTeam",
"Telegram: @iNeoTeam",
"Name: $firstname",
);
if(in_array($text, ["/start", "استارت کردن ربات"])){
$message = "<b>سلام دوست من.\n\nمتن هولدر با هر بار استارت کردن ربات تغییر میکند.\n\nاگر با تلگرام نسخه موبایل وارد ربات شده اید، بعد از هر بار کلیک بر روی دکمه زیر، از چت خارج و مجددا وارد شوید تا متن تغییر کند.\n\nگروه ربات سازی و خدمات مجازی آی نئو\n</b>@iNeoTeam";
$button = json_encode(['keyboard' => [
[['text' => "استارت کردن ربات"]],
],
'resize_keyboard' => true,
'input_field_placeholder' => $list[array_rand($list)]]);
$r = $bot->sendMessage($chat_id, $message, "HTML", true, $message_id, $button);
}else{
$bot->sendMessage($chat_id, "*دستور پیدا نشد.*", "MarkDown");
}
unlink("error_log");
?>