-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathTabchi.php
More file actions
1349 lines (1231 loc) · 80.6 KB
/
Copy pathTabchi.php
File metadata and controls
1349 lines (1231 loc) · 80.6 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php /** @noinspection ALL */
/**
* Tabchi v1.0.0 Async
*
* @author realSamy <https://t.me/realSamy>
* @author Madeline Farsi <https://t.me/Madeline_Farsi>
*
* Join our channel and feel free to use this file!
*/
##-----------------Functions------------------##
function savedata($data)
{
file_put_contents('./data/data.json', json_encode($data, 128|256));
}
function saveword($word)
{
file_put_contents('./data/word.json', json_encode($word, 128|256));
}
##-----------------Functions------------------##
##------------------DataBase------------------##
if (!file_exists('./data/')) {
mkdir('./data');
}
if (!file_exists('./data/data.json')) {
$file = fopen('./data/data.json', 'w');
fclose($file);
$data["data"]["state"] = "آنلاین✅";
$data["data"]["Typing"] = "خاموش❌";
$data["data"]["ANS_PV"] = "خاموش❌";
$data["data"]["Join"] = "خاموش❌";
$data["data"]["Save"] = "خاموش❌";
$data["data"]["JoinSave"] = "خاموش❌";
$data["data"]["ANS_GP"] = "خاموش❌";
$data["data"]["Read"] = "خاموش❌";
savedata($data);
}
if (!file_exists('./data/word.json')) {
$file = fopen('./data/word.json', 'w');
fclose($file);
$word["on"] = "on";
saveword($word);
}
##------------------DataBase------------------##
##---------------Madeline Install-------------##
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
use danog\MadelineProto\API;
use danog\MadelineProto\EventHandler;
use danog\MadelineProto\RPCErrorException;
##---------------Madeline Install-------------##
##------------------Variables-----------------##
$template = '<html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Tabchi - Login</title><link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet"><style>body {color: aliceblue;background: darkgray; background: url("https://cdn.bestbadboy.ir/images/bg1.png") fixed center; background-size: cover;}div.main,footer {background: url("https://cdn.bestbadboy.ir/images/bg1_blured.png") fixed center;background-size: cover;}</style></head><body><div class="container-fluid"><div class="row"><div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2 col-xs-12" style="padding: 0"><div class="main" style="padding: 10px; margin-top: 100px; box-shadow: 0 0 5px 1px black; border: aliceblue 1px; border-radius: 5px"><div class="blur"></div><h3 class="text-center">Tabchi V1.0.0 Login </h3><hr><br><form method="post" style="text-align: center">%s<br><button class="btn btn-info btn-block btn-sm" type="submit">Go</button></form><h4 class="text-center">%s </h4></div></div></div></div><footer style="position: fixed; bottom: 0; width: 100vw"><h5 class="text-center">This File Was Shared On MadelineProto Farsi Channel <a class="btn btn-success btn-sm" role="button" href="https://t.me/MadelineProto_farsi" target="_blank">Join Us</a></h5></footer><script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script><script>$(document).ready(function() {$("select").addClass("form-control");$("input").addClass("form-control");$("img").hide();})</script></body></html>';
$APITemplate = '<html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Tabchi - Login</title><link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet"><style>body {color: aliceblue;background: darkgray; background: url("https://cdn.bestbadboy.ir/images/bg1.png") fixed center; background-size: cover;}div.main,footer {background: url("https://cdn.bestbadboy.ir/images/bg1_blured.png") fixed center;background-size: cover;}</style></head><body><div class="container-fluid"><div class="row"><div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2 col-xs-12" style="padding: 0"><div class="main" style="padding: 10px; margin-top: 100px; box-shadow: 0 0 5px 1px black; border: aliceblue 1px; border-radius: 5px"><div class="blur"></div><h3 class="text-center">Tabchi V1.0.0 Login </h3><hr><h6 class="text-center">%s </h6><br><form method="post" style="text-align: center">%s<br><button class="btn btn-info btn-block btn-sm" type="submit">Go</button></form></div></div></div></div><footer style="position: fixed; bottom: 0; width: 100vw"><h5 class="text-center">This File Was Shared On MadelineProto Farsi Channel <a class="btn btn-success btn-sm" role="button" href="https://t.me/MadelineProto_farsi" target="_blank">Join Us</a></h5></footer><script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script><script>$(document).ready(function() {$("select").addClass("form-control");$("input").addClass("form-control");$("img").hide();})</script></body></html>';
$data = json_decode(file_get_contents('./data/data.json'), true);
if (!isset($data['data']['sudo']) or isset($_GET['changeSudo'])) {
if (!isset($_POST['sudo'])) {
$input = '<input type="number" name="sudo" placeholder="Admin ID" minlength="6" title="Please Enter Admin ID" required>';
$login = sprintf($template, $input, "Please Enter Admin ID, e.g. 847046122");
echo $login;
exit();
} else {
$data['data']['sudo'] = $_POST['sudo'];
savedata($data);
$url = "http".(!empty($_SERVER['HTTPS'])?"s":"").
"://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$url = explode('?', $url);
header('location: ' . $url[0]);
}
}
$dev = (int) $data['data']['sudo'];
$settings = [
'logger' => [
'max_size' => 1 * 1024 * 1024
],
'serialization' => [
'cleanup_before_serialization' => true
],
'app_info' => [
'api_id' => 839407,
'api_hash' => '0a310f9d03f51e8aa00d9262ef55d62e'
]
];
$MadelineProto = new API('realSamy.madeline', $settings);
##------------------Variables-----------------##
##---------------Event Handler----------------##
class realSamy extends EventHandler
{
/**
* Get peer(s) where to report errors
*
* @return int|string|array
*/
public function getReportPeers()
{
return [];
}
/**
* Handle updates from supergroups and channels
*
* @param array $update Update
*
* @return void
*/
public function onUpdateNewChannelMessage(array $update): \Generator
{
return $this->onUpdateNewMessage($update);
}
/**
* Handle updates from users.
*
* @param array $update Update
*
* @return \Generator
*/
public function onUpdateNewMessage(array $update): \Generator
{
if (isset($update['message']['out']) && $update['message']['out']) {
return;
}
if (file_exists("./re")) {
unlink('./re');
$this->restart();
}
$data = json_decode(file_get_contents('./data/data.json'), true);
$word = json_decode(file_get_contents('./data/word.json'), true);
if (isset($update['message']['message'])) {
$msg = $update['message']['message'];
$msg_id = $update['message']['id'];
$userID = (isset($update['message']['from_id'])) ? $update['message']['from_id'] : 'me';
$chatID = $update;
$peer = $update['message']['to_id'];
$info = yield $this->getInfo($peer);
$type = $info['type'];
$type3 = (isset($type['type'])) ? $type['type'] : $type;
$state = $data["data"]["state"];
$ANS_GP = $data["data"]["ANS_GP"];
$Read = $data["data"]["Read"];
$Typing = $data["data"]["Typing"];
$ANS_PV = $data["data"]["ANS_PV"];
$Join = $data["data"]["Join"];
$Save = $data["data"]["Save"];
$JoinSave = $data["data"]["JoinSave"];
$Saman = '<a href="mention:@realSamy">Saman</a>';
$Samy = '<a href="mention:@realSamy">Samy</a>';
$me = $this->getSelf();
$me_id = $me['id'];
$sudo = $GLOBALS['dev'];
try {
if ($userID == $sudo or isset($data['data']['Admins'][$userID])) {
if ($msg == "ping") {
yield $this->messages->sendMessage(['peer' => $update, 'message' => "pong!", 'reply_to_msg_id' => $msg_id]);
}
if ($msg == "Reset") {
$data['restart'] = true;
savedata($data);
yield $this->messages->sendMessage(['peer' => $update, 'message' => "Done!", 'reply_to_msg_id' => $msg_id]);
}
if ($msg == "Restart") {
if (isset($data['restart']) && $data['restart'] == true) {
yield $this->messages->sendMessage(['peer' => $update, 'message' => "Restarted!!", 'reply_to_msg_id' => $msg_id]);
$data['restart'] = false;
savedata($data);
die('Restarted Successfully!');
} else {
yield $this->messages->sendMessage(['peer' => $update, 'message' => "Reset not set!!", 'reply_to_msg_id' => $msg_id]);
}
}
}
if ($Read === "آنلاین✅") {
if (in_array($type, ["supergroup", "channel"])) {
yield $this->channels->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
} else {
yield $this->messages->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
try {
if ($userID === $sudo or isset($data["data"]["Admins"][$userID]) and $state === "آنلاین✅") {
if (preg_match('/^setphoto$/i', $msg, $mch)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rp = $update['message']['reply_to_msg_id'];
$Chat = yield$this->getPwrChat($peer, false);
$type = $Chat['type'];
if (in_array($type, ['channel', 'supergroup'])) {
$messeg = yield$this->channels->getMessages(['channel' => $peer, 'id' => [$rp],]);
} else {
$messeg = yield$this->messages->getMessages(['id' => [$rp],]);
}
if (isset($messeg['messages'][0]['media']['photo'])) {
$media = $messeg['messages'][0]['media'];
yield$this->photos->uploadProfilePhoto(['file' => $media,]);
$text = "Profile Photo Uploaded Successfully!";
} else {
$text = "This Command Should Be Used In Reply Of A Photo!";
}
} else {
$text = "This Command Should Be Used In Reply Of A Photo!";
}
yield$this->messages->sendMessage(['peer' => $peer, 'reply_to_msg_id' => $msg_id, 'message' => $text]);
}
if (preg_match('/^delphoto ([0-9]{1,3})$/i', $msg, $mch)) {
$tdd = $mch[1];
$me = yield$this->getSelf();
$photos = yield$this->photos->getUserPhotos(['user_id' => 'me', 'offset' => 0, 'max_id' => 0, 'limit' => $tdd,]);
$a = yield$this->photos->deletePhotos(['id' => $photos['photos'],]);
$cc = count($a);
yield$this->messages->sendMessage(['peer' => $peer, 'reply_to_msg_id' => $msg_id, 'message' => "$cc عکس پروفایل حذف شد!"]);
}
if (preg_match("/^[#!\/]?(f2all)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rid = $update['message']['reply_to_msg_id'];
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه پیوی ها ارسال خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
if ($type3 == "supergroup" || $type3 == "user" || $type3 == "supergroup") {
try {
yield $this->messages->forwardMessages(['from_peer' => $chatID, 'to_peer' => $peer, 'id' => [$rid],]);
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
}
sleep(2);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(s2all)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rid = $update['message']['reply_to_msg_id'];
if (in_array($type, ['channel', 'supergroup'])) {
$messeg = yield$this->channels->getMessages(['channel' => $peer, 'id' => [$rid],]);
} else {
$messeg = yield$this->messages->getMessages(['id' => [$rid],]);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه چت ها ارسال خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$messeg = $messeg['messages'][0];
if (!isset($messeg['media'])) {
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
} else {
$media = $messeg['media'];
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
}
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "supergroup" || $type3 == "user" || $type3 == "chat") {
if (!isset($media)) {
yield $this->messages->sendMessage(['peer' => $peer, 'message' => $text, 'entities' => $entities, 'parse_mode' => 'Markdown']);
} else {
yield $this->messages->sendMedia(['peer' => $peer, 'message' => $text, 'media' => $media, 'entities', $entities, 'parse_mode' => 'Markdown']);
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
sleep(2);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(f2sgps)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه سوپرگروه ها فوروارد خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$rid = $update['message']['reply_to_msg_id'];
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
if ($type3 == "supergroup") {
try {
yield $this->messages->forwardMessages(['from_peer' => $chatID, 'to_peer' => $peer, 'id' => [$rid],]);
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
sleep(2);
}
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(s2sgps)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rid = $update['message']['reply_to_msg_id'];
if (in_array($type, ['channel', 'supergroup'])) {
$messeg = yield$this->channels->getMessages(['channel' => $peer, 'id' => [$rid],]);
} else {
$messeg = yield$this->messages->getMessages(['id' => [$rid],]);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه سوپرگروه ها ارسال خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$messeg = $messeg['messages'][0];
if (!isset($messeg['media'])) {
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
} else {
$media = $messeg['media'];
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
}
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "supergroup") {
if (!isset($media)) {
yield $this->messages->sendMessage(['peer' => $peer, 'message' => $text, 'entities' => $entities, 'parse_mode' => 'Markdown']);
} else {
yield $this->messages->sendMedia(['peer' => $peer, 'message' => $text, 'media' => $media, 'entities', $entities, 'parse_mode' => 'Markdown']);
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
sleep(2);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(f2gps)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه گروه ها فوروارد خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$rid = $update['message']['reply_to_msg_id'];
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "chat") {
yield $this->messages->forwardMessages(['from_peer' => $chatID, 'to_peer' => $peer, 'id' => [$rid],]);
sleep(2);
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(s2gps)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rid = $update['message']['reply_to_msg_id'];
if (in_array($type, ['channel', 'supergroup'])) {
$messeg = yield$this->channels->getMessages(['channel' => $peer, 'id' => [$rid],]);
} else {
$messeg = yield$this->messages->getMessages(['id' => [$rid],]);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه گروه ها ارسال خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$messeg = $messeg['messages'][0];
if (!isset($messeg['media'])) {
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
} else {
$media = $messeg['media'];
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
}
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "chat") {
if (!isset($media)) {
yield $this->messages->sendMessage(['peer' => $peer, 'message' => $text, 'entities' => $entities, 'parse_mode' => 'Markdown']);
} else {
yield $this->messages->sendMedia(['peer' => $peer, 'message' => $text, 'media' => $media, 'entities', $entities, 'parse_mode' => 'Markdown']);
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
sleep(2);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(f2pvs)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه پیوی ها فوروارد خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$rid = $update['message']['reply_to_msg_id'];
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "user") {
yield $this->messages->forwardMessages(['from_peer' => $chatID, 'to_peer' => $peer, 'id' => [$rid],]);
sleep(2);
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(s2pvs)$/i", $msg)) {
if (isset($update['message']['reply_to_msg_id'])) {
$rid = $update['message']['reply_to_msg_id'];
if (in_array($type, ['channel', 'supergroup'])) {
$messeg = yield$this->channels->getMessages(['channel' => $peer, 'id' => [$rid],]);
} else {
$messeg = yield$this->messages->getMessages(['id' => [$rid],]);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ پست شما به همه پیوی ها ارسال خواهد شد!
⏰ تاخیر بین هر ارسال 2 ثانیه", 'parse_mode' => 'html']);
$messeg = $messeg['messages'][0];
if (!isset($messeg['media'])) {
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
} else {
$media = $messeg['media'];
$text = (isset($messeg['message'])) ? $messeg['message'] : null;
$entities = (isset($messeg['entities'])) ? $messeg['entities'] : null;
}
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "user") {
if (!isset($media)) {
yield $this->messages->sendMessage(['peer' => $peer, 'message' => $text, 'entities' => $entities, 'parse_mode' => 'Markdown']);
} else {
yield $this->messages->sendMedia(['peer' => $peer, 'message' => $text, 'media' => $media, 'entities', $entities, 'parse_mode' => 'Markdown']);
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
sleep(2);
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
}
if (preg_match("/^[#!\/]?(addall) (.*)$/i", $msg)) {
preg_match("/^[#!\/]?(addall) (.*)$/i", $msg, $text1);
if (isset($text1[2])) {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ کاربر مورد نظر به همه گروه ها ادد خواهد شد! \nCreator: $Saman", 'parse_mode' => "html"]);
$user = $text1[2];
$dialogs = yield $this->getDialogs();
foreach ($dialogs as $peer) {
$type = yield $this->getInfo($peer);
$type3 = $type['type'];
try {
if ($type3 == "supergroup") {
yield $this->channels->inviteToChannel(['channel' => $peer, 'users' => [$user]]);
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
}
if (preg_match("/^[#!\/]?(addpvs)/i", $msg)) {
if (preg_match("/^[#!\/]?(addpvs)$/i", $msg)) {
if ($type == "supergroup") {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ کاربران پیوی به گروه مورد نظر ادد خواهند شد! \nCreator: $Saman", 'parse_mode' => "html"]);
$chat = yield $this->getPwrChat($chatID);
foreach ($chat['participants'] as $pars) {
$ids[] = $pars['user']['id'];
}
$ids[] = 777000;
$dialogs = yield $this->getDialogs();
$users = [];
foreach ($dialogs as $user) {
$type = yield $this->getInfo($user);
$type3 = $type['type'];
if ($type3 == "user" && !in_array($user['user_id'], $ids)) {
$users[] = $user;
}
}
try {
yield $this->channels->inviteToChannel(['channel' => $chatID, 'users' => $users]);
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
} else if (preg_match("/^[#!\/]?(addpvs) (.*)$/i", $msg, $mch)) {
if (isset($mch[2])) {
$peer = $mch[2];
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "♻️ کاربران پیوی به $peer ادد خواهند شد! \nCreator: $Saman", 'parse_mode' => "html"]);
$chat = yield $this->getPwrChat($peer);
foreach ($chat['participants'] as $pars) {
$ids[] = $pars['user']['id'];
}
$ids[] = 777000;
$dialogs = yield $this->getDialogs();
$users = [];
foreach ($dialogs as $user) {
$type = yield $this->getInfo($user);
$type3 = $type['type'];
if ($type3 == "user" && !in_array($user['user_id'], $ids)) {
$users[] = $user;
}
}
try {
yield $this->channels->inviteToChannel(['channel' => $peer, 'users' => $users]);
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "عملیات تکمیل شد!"]);
}
}
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
try {
#########################################
if ($userID === $sudo or isset($data['data']['Admins'][$userID])) {
if (preg_match('/^[\/!#]?(tabchi|bot) (on|off)$/i', $msg, $mch)) {
if (preg_match('/on/', $mch[2])) {
$data["data"]["state"] = "آنلاین✅";
$text = "تبچی با موفقیت روشن شد!\n\nCreator: $Saman";
} else {
$data["data"]["state"] = "خاموش❌";
$text = "تبچی با موفقیت خاموش شد!\n\nCreator: $Saman";
}
savedata($data);
yield $this->messages->sendMessage(['peer' => $chatID, 'parse_mode' => 'html', 'message' => $text, 'reply_to_msg_id' => $msg_id]);
}
if (in_array($msg, ['state', 'vaziat', 'آنلاین✅', 'ربات', 'آنلاین', 'پینگ'])) {
$text = "ربات $state است." . PHP_EOL . "$Saman";
yield $this->messages->sendMessage(['peer' => $chatID, 'parse_mode' => 'html', 'message' => $text, 'reply_to_msg_id' => $msg_id]);
}
##==========================SETTINGS==========================##
if ($state === "آنلاین✅") {
if ($userID === $sudo or isset($data['data']['Admins'][$userID])) {
if ($state === "آنلاین✅") {
if (preg_match("/^[#!\/]?(addadmin) (.*)$/i", $msg)) {
preg_match("/^[#!\/]?(addadmin) (.*)$/i", $msg, $text1);
$Username = $text1[2];
$Array = yield $this->getFullInfo($Username);
$user_iD = $Array['bot_api_id'];
if (!isset($data["data"]["Admins"][$user_iD])) {
$data["data"]["Admins"][$user_iD] = $Username;
savedata($data);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "📣کاربر $Username ادمین ربات تنظیم شد \nCreator: $Saman ", 'parse_mode' => 'html']);
} else {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "📌 کاربر $Username از قبل ادمین بوده است\nCreator: $Samy ", 'parse_mode' => 'html']);
}
}
if (preg_match("/^[#!\/]?(deladmin) (.*)$/i", $msg)) {
preg_match("/^[#!\/]?(deladmin) (.*)$/i", $msg, $text1);
$Username = $text1[2];
$Array = yield $this->getFullInfo($Username);
$user_iD = $Array['bot_api_id'];
if (isset($data["data"]["Admins"][$user_iD])) {
unset($data["data"]["Admins"][$user_iD]);
savedata($data);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "📣کاربر $Username از ادمینی عزل شد", 'parse_mode' => 'html']);
} else {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "📌 کاربر $Username جزو ادمین های ربات نیست", 'parse_mode' => 'html']);
}
}
if (preg_match("/^[#!\/]?(listadmin)$/i", $msg)) {
$T = "📃 لیست همه ادمین ها";
$cc = 1;
foreach ($data['data']['Admins'] as $k => $u) {
$T .= "\n🗣 $cc ⇨ <a href='tg://user?id=$k'>$k</a>";
$cc++;
}
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$T", 'parse_mode' => 'html']);
}
if ($msg == "امار") {
$CL_c = 0;
$CH_c = 0;
$Gps_c = 0;
$Pvs_c = 0;
$dgs = yield $this->getFullDialogs();
foreach ($dgs as $dg) {
if (isset($dg['peer'])) {
$peer = $dg['peer'];
$info = yield $this->getInfo($peer);
$type = $info['type'];
switch ($type) {
case "channel":
$CL_c++;
break;
case "user":
$Pvs_c++;
break;
case "chat":
$Gps_c++;
break;
case "supergroup":
$CH_c++;
break;
default:
continue;
}
}
}
$mem_using = round(memory_get_usage() / 1024 / 1024, 1);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "📊 وضعیت تبچی : $state
----------------
👥 تعداد سوپرگروه ها : $CH_c
----------------
👣 تعداد گروه ها : $Gps_c
----------------
📩 تعداد پیوی ها : $Pvs_c
----------------
📢 تعداد کانال ها : $CL_c
----------------
☎️ چت خودکار پیوی : $ANS_PV
----------------
چت خودکار گروه : $ANS_GP
----------------
♻️ مقدار رم درحال استفاده : $mem_using مگابایت
----------------
Creator: $Samy", 'parse_mode' => 'html']);
}
if ($msg == "help" || $msg == "Help" || $msg == "راهنما" || $msg == "هلپ") {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => " ⚠️ راهنمای تبچی :
🔱 آنلاین - ربات - state - vaziat
• دریافت وضعیت ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 امار
•دریافت آمار گروه ها و کاربران
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 AddAdmin [ID]
• افزودن ادمین به ربات با آیدی عددی
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 DelAdmin [ID]
• عزل کردن ادمین ربات با آیدی عددی
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 ListAdmin
• نمایش لیست ادمین های ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Type on
• فعال شدن حالت تایپینگ بعد از هر پیام
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Type off
• غیرفعال شدن حالت تایپینگ بعد از هر پیام
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Read on
• فعال شدن حالت خوانده شدن پیام ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Read off
• غیرفعال شدن حالت خوانده شدن پیام ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 PvAnswer on
• فعال کردن چت خودکار در پیوی
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 PvAnswer off
• غیرفعال کردن چت خودکار در پیوی
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 GpAnswer on
• فعال کردن چت خودکار در گروه
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 GpAnswer off
• غیرفعال کردن چت خودکار در گروه
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Word on
• فعال کردن جواب سریع
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Word off
• غیرفعال کردن جواب سریع
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 SetAnswer Word|Answer
• افزودن جواب سریع به ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 DelAnswer Word
• حذف یک کلمه از ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 AnswerList
• لیست کلمات ذخیره شده
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Clean Answers
• خالی کردن لیست جواب های سریع
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 addpvs
• ادد کردن همه پیوی ها به گروه
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 addall [UserID]
• ادد کردن یک کاربر به همه گروه ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 f2all [reply]
• فروارد کردن پیام ریپلای شده به همه گروه ها و کاربران
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 f2pvs [reply]
• فروارد کردن پیام ریپلای شده به همه کاربران
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 f2gps [reply]
• فروارد کردن پیام ریپلای شده به همه گروه ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 f2sgps [reply]
• فروارد کردن پیام ریپلای شده به همه سوپرگروه ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 s2all [reply]
• ارسال کردن پیام ریپلای شده به همه گروه ها و کاربران
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 s2pvs [reply]
• ارسال کردن پیام ریپلای شده به همه کاربران
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 s2gps [reply]
• ارسال کردن پیام ریپلای شده به همه گروه ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 s2sgps [reply]
• ارسال کردن پیام ریپلای شده به همه سوپرگروه ها
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 set [ID]
• تنظیم نام کاربری (آیدی) ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Profile [First Name]|[Last Name]|[Bio]
• تنظیم نام اسم , فامیل و بیوگرافی ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 SetPhoto [reply]
• تنظیم عکس ریپلی شده بعنوان پروفایل ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 DelPhoto [number]
• حذف پروفایل های ربات
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Join on
• ورود خودکار ربات به گروه باارسال لینک
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Join off
• جلوگیری از ورود خودکار ربات به گروه
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Save on
• ذخیره کردن لینک های عضو نشده
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Save off
• جلوگیری از ذخیره کردن لینک های عضو نشده
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 JoinSave on
• ورود خودکار ربات به لینک های ذخیره شده
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 JoinSave off
• جلوگیری از ورود خودکار ربات لینک های ذخیره شده
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔱 Creator: $Saman ", 'parse_mode' => 'html']);
}
}
}
}
}
} catch (RPCErrorException $e) {
$this->report("ارور: " . $e->rpc);
} catch (Exception $e) {
}
$A_SLM = ["سلام😇",
"سلام 🙃", "سلام 😶", "دلام",
"شلوم😵", "سلام", "slm",
"Slm😛", "سلام چطوری 😒", "😑😑😑😑",
"☹س", "😐صلام", "🙄",
"شلام 😸", "سلام 😿", "دلام دوبی 🤕",
"salam", "slm khobi 😶", "چطوری 🙄",
"خوبی ؟ ☹", "صلوم 🙃", "slm",
];
$A_KHOBI = ["خوبم مرسی تو خوبی",
"ممنون تو خوبی 😶", "🙄", "چطوری 😵",
"mmnon to khobi ? 🙄", "فدات ", "مرسی ",
"mrc 🌸", "فدای داری 😛", "slm",
];
$A_FADAT = ["😻",
"😘", "😃", "💛",
"💚", "🙂", "🙃",
"اصل میدی", "😋", "اصل ؟",
"😉", "🤗", "slm",
"😦", "☹", "🙁",
"😯", "😑", "slm",
"اasl🙃",
];
$A_ASL = ["slm",
"18 teh", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm"
];
$A_EMOJI = ["slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm",
"slm", "slm", "slm"
];
$slm_r = array_rand($A_SLM);
$R_SLM = $A_SLM[$slm_r];
$khobi_r = array_rand($A_KHOBI);
$R_KHOBI = $A_KHOBI[$khobi_r];
$fadat_r = array_rand($A_FADAT);
$R_FADAT = $A_FADAT[$fadat_r];
$asl_r = array_rand($A_ASL);
$R_ASL = $A_ASL[$asl_r];
$emoji_r = array_rand($A_EMOJI);
$R_EMOJI = $A_EMOJI[$emoji_r];
try {
if (true) {
if ($word['on'] === "on") {
if (isset($word["word"]["$msg"])) {
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => $word["word"]["$msg"], 'parse_mode' => 'html']);
}
}
if ($type == "supergroup" or $type3 == "chat") {
if ($ANS_GP === "آنلاین✅") {
if (preg_match("/^([سدصث]{1,8}[ل]{1,8}[اآ]{1,8}[م]{1,8})|([s]{1,8}[l]{1,8}[m]{1,8})|([s]{1,8}[a]{1,8}[l]{1,8}[a]{1,8}[m]{1,8})/i", $msg)) {
if ($Read === "آنلاین✅") {
yield $this->channels->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$R_SLM", 'parse_mode' => 'MarkDown']);
} else if (preg_match('/^([خ|د]{1,9}[و]{0,9}[ب|ف]{1,9}[ی]{1,9})|([چ|ج|ش]{1,9}[ط|ت]{1,9}[و]{0,9}[ر|ل]{1,9}[ی]{1,9})|([k]{1,9}[h]{1,9}[o]{0,9}[b]{1,9}[i]{1,9})|([c]{1,9}[h]{1,9}[e]{0,9}[t]{1,9}[o]{0,9}[r|l]{1,9}[i]{1,9})/i', $msg)) {
if ($Read === "آنلاین✅") {
yield $this->channels->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$R_KHOBI", 'parse_mode' => 'MarkDown']);
} else if (preg_match('/^([ف]{1,8}[د]{1,8}[ا|آ]{1,8}[ت|ط]{1,8}[م]{0,8})|([f]{1,8}[a]{0,8}[d]{1,8}[a]{0,8}[t]{1,8}[a]{0,8}[m]{0,8})/', $msg)) {
if ($Read === "آنلاین✅") {
yield $this->channels->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$R_FADAT", 'parse_mode' => 'MarkDown']);
}
}
} else if ($type == "user") {
if ($ANS_PV === "آنلاین✅") {
if (preg_match("/^([س|د|ص|ث]{1,8}[ل]{1,8}[ا|آ]{1,8}[م]{1,8})|([s]{1,8}[l]{1,8}[m]{1,8})|([s]{1,8}[a]{1,8}[l]{1,8}[a]{1,8}[m]{1,8})/i", $msg)) {
if ($Read === "آنلاین✅") {
yield $this->messages->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$R_SLM", 'parse_mode' => 'MarkDown']);
} else if (preg_match("/^([خ|د]{1,9}[و]{0,9}[ب|ف]{1,9}[ی]{1,9})|([چ|ج|ش]{1,9}[ط|ت]{1,9}[و]{0,9}[ر|ل]{1,9}[ی]{1,9})|([k]{1,9}[h]{1,9}[o]{0,9}[b]{1,9}[i]{1,9})|([c]{1,9}[h]{1,9}[e]{0,9}[t]{1,9}[o]{0,9}[r|l]{1,9}[i]{1,9})/i", $msg)) {
if ($Read === "آنلاین✅") {
yield $this->messages->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);
yield $this->messages->sendMessage(['peer' => $chatID, 'reply_to_msg_id' => $msg_id, 'message' => "$R_KHOBI", 'parse_mode' => 'MarkDown']);
} else if (preg_match('/^([ف]{1,8}[د]{1,8}[ا|آ]{1,8}[ت|ط]{1,8}[م]{0,8})|([f]{1,8}[a]{0,8}[d]{1,8}[a]{0,8}[t]{1,8}[a]{0,8}[m]{0,8})/', $msg)) {
if ($Read === "آنلاین✅") {
yield $this->messages->readMessageContents(['channel' => $chatID, 'id' => [$msg_id]]);
}
if ($Typing === "آنلاین✅") {
$sendMessageTypingAction = ['_' => 'sendMessageTypingAction'];
yield $this->messages->setTyping(['peer' => $chatID, 'action' => $sendMessageTypingAction]);
}
yield $this->sleep(1.3);