-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathx.py
2550 lines (2432 loc) ยท 126 KB
/
x.py
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
# -*- coding: utf-8 -*-
import TOBY
from TOBY.lib.curve.ttypes import *
from datetime import datetime
import time,random,sys,json,codecs,threading,glob
cl = TOBY.LINE()
cl.login(qr=True)
cl.loginResult()
ki = TOBY.LINE()
ki.login(token="EmV4o3JFXlJfb0d0jBPf.kWMNfbruKvmtKCYb1pBDtW.152WWBfyZXslE1RVV/3oFwJoJrYLt/PSPA69B3++qRk=")
ki.loginResult()
ki2 = TOBY.LINE()
ki2.login(token="EngVtW9flCdMfGcCXTm0.8V1Jta/418TBYgV16PxNGa.k+iOOFkmZBxQ4/mVDG993+f5LNKBV27M/pJmWukSQsQ=")
ki2.loginResult()
ki3 = TOBY.LINE()
ki3.login(token="EnrO3zqoyO8IQTNYX1td.6zkjQFWmC+uV1x5DkPufhq.S8Ci6WbGTwcZ+wJN6QCNOiDU0xOliTpQjYpMgQcr3ns=")
ki3.loginResult()
ki4 = TOBY.LINE()
ki4.login(token="EnrO3zqoyO8IQTNYX1td.6zkjQFWmC+uV1x5DkPufhq.S8Ci6WbGTwcZ+wJN6QCNOiDU0xOliTpQjYpMgQcr3ns=")
ki4.loginResult()
print u"login success"
reload(sys)
sys.setdefaultencoding('utf-8')
helpMessage =""" โ KออฬอฬอออฬงฬคฬฑอฬฑฬคฬฬญIออ ฬฬอฬฬฃฬปฬฬอฬต TฬฟฬฬฬฬอฬฉออฬนฬซอSฬฬอฬฟอฬคฬฒฬฏอ
ฬคฬนฬฒฬฒฬUอฬฬฟอฬพฬพฬจฬผฬฒฬบฬฃฬฌฬถNฬฬฬพอออฬฃฬฒอขฬญฬอฬฒฬฬชฬจฬถEฬฬออฬฬฬฟอฬฑอขฬบฬ Bฬฬฬฬฬอฬอ ฬกออฬฬบอฬฬฬฉฬฬดOอฬฬฬพฬพอฬฬฉฬฃอ
ฬฒฬฃฬกฬอฬธT CฬฬฬอฬอออฬฬอฬฬซฬฐฬฎฬบฬฬงฬฅฬตOฬฟฬอ ฬอฬฬบฬ อ
ฬฐฬณฬงฬท Nฬฬฬฬฬอออฬฬปอ
ฬฐอฬฎฬผฬถTฬฬฬอฬอฬฏฬงฬขฬฑอฬ อฬคฬRอฬอฬฬฬฬฉฬฑฬฬฏฬถOฬฬฬฬฬอฬอ ฬกออฬฬบอฬฬฬฉฬฬดLอฬฬฬพฬพอฬฬฉฬฃอ
ฬฒฬฃฬกฬอฬธ โ
๔๔๔ฟฟ [Id]
๔๔๔ฟฟ [Mid]
๔๔๔ฟฟ [Me]
๔๔๔ฟฟ [TL ใTextใ
๔๔๔ฟฟ [MyName]
๔๔๔ฟฟ [I Gift]
๔๔๔ฟฟ [Mid ใmidใ
๔๔๔ฟฟ [Group id]
๔๔๔ฟฟ [Group cancel]
๔๔๔ฟฟ [Tagall]
๔๔๔ฟฟ [Sider]
๔๔๔ฟฟ [Read]
๔๔๔ฟฟ [album ใidใ]
๔๔๔ฟฟ [Hapus album ใidใ
๔๔๔ฟฟ [Contact on]
๔๔๔ฟฟ [Contact off]
๔๔๔ฟฟ [Auto join on]
๔๔๔ฟฟ [Auto join off]
๔๔๔ฟฟ [Cancelall]
๔๔๔ฟฟ [Cleanse]
๔๔๔ฟฟ [Auto leave on]
๔๔๔ฟฟ [Auto leave off]
๔๔๔ฟฟ [Auto add on/off]
๔๔๔ฟฟ [Jam on]
๔๔๔ฟฟ [Jam off]
๔๔๔ฟฟ [Jam say]
๔๔๔ฟฟ [UP]
๔๔๔ฟฟ [Ban:on]
๔๔๔ฟฟ [Unban:on]
๔๔๔ฟฟ [Banlist]
๔๔๔ฟฟ [Com on]
๔๔๔ฟฟ [Com set]
๔๔๔ฟฟ [Mcheck]
๔๔๔ฟฟ [Message Confirmation]
๔๔๔ฟฟ [Mybio: ใIsi Bioใ]
๔๔๔ฟฟ [Allbio: ใIsi Bio botใ]
[Cฬฒฬ
ฬถแดฬฒฬ
ฬถแดฬฒฬ
ฬถแดฬฒฬ
ฬถแดฬฒฬ
ฬถษดฬฒฬ
ฬถแด
ฬฒฬ
ฬถ ฬฒฬ
ฬถษชฬฒฬ
ฬถษดฬฒฬ
ฬถ ฬฒฬ
ฬถGฬฒฬ
ฬถสฬฒฬ
ฬถแดฬฒฬ
ฬถแดฬฒฬ
ฬถแดฬฒฬ
ฬถ]
๔๔๔ฟฟ [Link on]
๔๔๔ฟฟ [Link off]
๔๔๔ฟฟ [Inviteใmidใ]
๔๔๔ฟฟ [Kmid: Kick by mid]
๔๔๔ฟฟ [Ginfo]
๔๔๔ฟฟ [Cancel]
๔๔๔ฟฟ [Copy @]
๔๔๔ฟฟ [Backup]
๔๔๔ฟฟ [Kuy]
๔๔๔ฟฟ [Papay]
๔๔๔ฟฟ [Gn ใNama grupใ
๔๔๔ฟฟ [Gurl]
๔๔๔ฟฟ [gurlใkelompok ID
๔๔๔ฟฟ [Nkใnamaใ]
๔๔๔ฟฟ [NK:]
๔๔๔ฟฟ [Ban:]
๔๔๔ฟฟ [Unban:]
๔๔๔ฟฟ [Protect on]
๔๔๔ฟฟ [qrprotect on/off]
๔๔๔ฟฟ [Inviteprotect on]
๔๔๔ฟฟ [Cancelprotect on]
๔๔๔ฟฟ [Staff add/remove @]
โฏ==== Creator ====โฏ
http://line.me/ti/p/~getk3333
โ KออฬอฬอออฬงฬคฬฑอฬฑฬคฬฬญIออ ฬฬอฬฬฃฬปฬฬอฬต TฬฟฬฬฬฬอฬฉออฬนฬซอSฬฬอฬฟอฬคฬฒฬฏอ
ฬคฬนฬฒฬฒฬUอฬฬฟอฬพฬพฬจฬผฬฒฬบฬฃฬฌฬถNฬฬฬพอออฬฃฬฒอขฬญฬอฬฒฬฬชฬจฬถEฬฬออฬฬฬฟอฬฑอขฬบฬ Bฬฬฬฬฬอฬอ ฬกออฬฬบอฬฬฬฉฬฬดOอฬฬฬพฬพอฬฬฉฬฃอ
ฬฒฬฃฬกฬอฬธT CฬฬฬอฬอออฬฬอฬฬซฬฐฬฎฬบฬฬงฬฅฬตOฬฟฬอ ฬอฬฬบฬ อ
ฬฐฬณฬงฬท Nฬฬฬฬฬอออฬฬปอ
ฬฐอฬฎฬผฬถTฬฬฬอฬอฬฏฬงฬขฬฑอฬ อฬคฬRอฬอฬฬฬฬฉฬฑฬฬฏฬถOฬฬฬฬฬอฬอ ฬกออฬฬบอฬฬฬฉฬฬดLอฬฬฬพฬพอฬฬฉฬฃอ
ฬฒฬฃฬกฬอฬธ โ
"""
helo=""
KAC=[cl,ki,ki2,ki3,ki4]
mid = cl.getProfile().mid
kimid = ki.getProfile().mid
ki2mid = ki2.getProfile().mid
ki3mid = ki3.getProfile().mid
ki4mid = ki4.getProfile().mid
Bots = [mid,kimid,ki2mid,ki3mid,ki4mid]
admsa = "uca51afa767df87ba3705494b97c3355c"
admin = "uca51afa767df87ba3705494b97c3355c"
wait = {
'contact':False,
'autoJoin':True,
'autoCancel':{"on":False,"members":50},
'leaveRoom':True,
'timeline':False,
'autoAdd':True,
'message':"Thanks For Add Me",
"lang":"JP",
"comment":"Thanks For Add Me",
"commentOn":False,
"commentBlack":{},
"wblack":False,
"dblack":False,
"clock":False,
"cNames":"",
"cNames":"",
"blacklist":{},
"wblacklist":False,
"dblacklist":False,
"protect":True,
"cancelprotect":False,
"inviteprotect":False,
"linkprotect":False,
}
wait2 = {
'readPoint':{},
'readMember':{},
'setTime':{},
'ROM':{}
}
setTime = {}
setTime = wait2['setTime']
contact = cl.getProfile()
mybackup = cl.getProfile()
mybackup.displayName = contact.displayName
mybackup.statusMessage = contact.statusMessage
mybackup.pictureStatus = contact.pictureStatus
contact = ki.getProfile()
backup = ki.getProfile()
backup.displayName = contact.displayName
backup.statusMessage = contact.statusMessage
backup.pictureStatus = contact.pictureStatus
def cms(string, commands): #/XXX, >XXX, ;XXX, ^XXX, %XXX, $XXX...
tex = ["+","@","/",">",";","^","%","$","๏ผพ","ใตใใฉ:","ใตใใฉ:","ใตใใฉ๏ผ","ใตใใฉ๏ผ"]
for texX in tex:
for command in commands:
if string ==command:
return True
return False
def bot(op):
try:
if op.type == 0:
return
if op.type == 13:
if mid in op.param3:
G = cl.getGroup(op.param1)
if wait["autoJoin"] == True:
if wait["autoCancel"]["on"] == True:
if len(G.members) <= wait["autoCancel"]["members"]:
cl.rejectGroupInvitation(op.param1)
else:
cl.acceptGroupInvitation(op.param1)
else:
cl.acceptGroupInvitation(op.param1)
elif wait["autoCancel"]["on"] == True:
if len(G.members) <= wait["autoCancel"]["members"]:
cl.rejectGroupInvitation(op.param1)
else:
Inviter = op.param3.replace("",',')
InviterX = Inviter.split(",")
matched_list = []
for tag in wait["blacklist"]:
matched_list+=filter(lambda str: str == tag, InviterX)
if matched_list == []:
pass
else:
cl.cancelGroupInvitation(op.param1, matched_list)
if op.type == 19:
if mid in op.param3:
wait["blacklist"][op.param2] = True
if op.type == 22:
if wait["leaveRoom"] == True:
cl.leaveRoom(op.param1)
if op.type == 24:
if wait["leaveRoom"] == True:
cl.leaveRoom(op.param1)
if op.type == 26:
msg = op.message
if msg.toType == 0:
msg.to = msg.from_
if msg.from_ == "uca51afa767df87ba3705494b97c3355c":
if "join:" in msg.text:
list_ = msg.text.split(":")
try:
cl.acceptGroupInvitationByTicket(list_[1],list_[2])
G = cl.getGroup(list_[1])
G.preventJoinByTicket = True
cl.updateGroup(G)
except:
cl.sendText(msg.to,"error")
if msg.toType == 1:
if wait["leaveRoom"] == True:
cl.leaveRoom(msg.to)
if msg.contentType == 16:
url = msg.contentMetadata["postEndUrl"]
cl.like(url[25:58], url[66:], likeType=1001)
if op.type == 25:
msg = op.message
if msg.contentType == 13:
if wait["winvite"] == True:
if msg.from_ in admin:
_name = msg.contentMetadata["displayName"]
invite = msg.contentMetadata["mid"]
groups = cl.getGroup(msg.to)
pending = groups.invitee
targets = []
for s in groups.members:
if _name in s.displayName:
cl.sendText(msg.to,"-> " + _name + " was here")
break
elif invite in wait["blacklist"]:
ki.sendText(msg.to,"Sorry, " + _name + " On Blacklist")
ki.sendText(msg.to,"Call my daddy to use command !, \nโกUnban: " + invite)
break
else:
targets.append(invite)
if targets == []:
pass
else:
for target in targets:
try:
cl.findAndAddContactsByMid(target)
cl.inviteIntoGroup(msg.to,[target])
cl.sendText(msg.to,"Done Invite : \nโก" + _name)
wait["winvite"] = False
break
except:
try:
ki.findAndAddContactsByMid(invite)
ki.inviteIntoGroup(op.param1,[invite])
wait["winvite"] = False
except:
cl.sendText(msg.to,"Negative, Error detected")
wait["winvite"] = False
break
if msg.contentType == 13:
if wait["wblack"] == True:
if msg.contentMetadata["mid"] in wait["commentBlack"]:
cl.sendText(msg.to,"sudah masuk daftar hitam๐")
wait["wblack"] = False
else:
wait["commentBlack"][msg.contentMetadata["mid"]] = True
wait["wblack"] = False
cl.sendText(msg.to,"Itu tidak berkomentar๐")
elif wait["dblack"] == True:
if msg.contentMetadata["mid"] in wait["commentBlack"]:
del wait["commentBlack"][msg.contentMetadata["mid"]]
cl.sendText(msg.to,"Done")
wait["dblack"] = False
else:
wait["dblack"] = False
cl.sendText(msg.to,"Tidak ada dalam daftar hitam๐")
elif wait["wblacklist"] == True:
if msg.contentMetadata["mid"] in wait["blacklist"]:
cl.sendText(msg.to,"sudah masuk daftar hitam")
wait["wblacklist"] = False
else:
wait["blacklist"][msg.contentMetadata["mid"]] = True
wait["wblacklist"] = False
cl.sendText(msg.to,"Done๐")
elif wait["dblacklist"] == True:
if msg.contentMetadata["mid"] in wait["blacklist"]:
del wait["blacklist"][msg.contentMetadata["mid"]]
cl.sendText(msg.to,"Done๐")
wait["dblacklist"] = False
else:
wait["dblacklist"] = False
cl.sendText(msg.to,"Done๐")
elif wait["contact"] == True:
msg.contentType = 0
cl.sendText(msg.to,msg.contentMetadata["mid"])
if 'displayName' in msg.contentMetadata:
contact = cl.getContact(msg.contentMetadata["mid"])
try:
cu = cl.channel.getCover(msg.contentMetadata["mid"])
except:
cu = ""
cl.sendText(msg.to,"[displayName]:\n" + msg.contentMetadata["displayName"] + "\n[mid]:\n" + msg.contentMetadata["mid"] + "\n[statusMessage]:\n" + contact.statusMessage + "\n[pictureStatus]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[coverURL]:\n" + str(cu))
else:
contact = cl.getContact(msg.contentMetadata["mid"])
try:
cu = cl.channel.getCover(msg.contentMetadata["mid"])
except:
cu = ""
cl.sendText(msg.to,"[displayName]:\n" + contact.displayName + "\n[mid]:\n" + msg.contentMetadata["mid"] + "\n[statusMessage]:\n" + contact.statusMessage + "\n[pictureStatus]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[coverURL]:\n" + str(cu))
elif msg.contentType == 16:
if wait["timeline"] == True:
msg.contentType = 0
if wait["lang"] == "JP":
msg.text = "menempatkan URL\n" + msg.contentMetadata["postEndUrl"]
else:
msg.text = "URLรขโ โ\n" + msg.contentMetadata["postEndUrl"]
cl.sendText(msg.to,msg.text)
elif msg.text is None:
return
elif msg.text.lower() == 'help':
if wait["lang"] == "JP":
cl.sendText(msg.to,helpMessage)
else:
cl.sendText(msg.to,helpMessage)
elif msg.text in ["Invite:on"]:
if msg.from_ in admin:
wait["winvite"] = True
cl.sendText(msg.to,"send contact")
elif ("Gn:" in msg.text):
if msg.toType == 2:
group = cl.getGroup(msg.to)
group.name = msg.text.replace("Gn:","")
ki.updateGroup(group)
else:
cl.sendText(msg.to,"Hal ini tidak dapat digunakan di luar kelompok๐")
elif ("Gn " in msg.text):
if msg.toType == 2:
group = cl.getGroup(msg.to)
group.name = msg.text.replace("Gn ","")
cl.updateGroup(group)
else:
cl.sendText(msg.to,"Can not be used for groups other than")
elif "Kick @" in msg.text:
midd = msg.text.replace("Kick @","")
cl.kickoutFromGroup(msg.to,[midd])
elif "Invite @" in msg.text:
midd = msg.text.replace("Invite @","")
cl.findAndAddContactsByMid(midd)
cl.inviteIntoGroup(msg.to,[midd])
elif "bot" == msg.text:
msg.contentType = 13
msg.contentMetadata = {'mid': kimid}
cl.sendMessage(msg)
msg.contentType = 13
msg.contentMetadata = {'mid': ki2mid}
cl.sendMessage(msg)
msg.contentType = 13
elif "Bot1" == msg.text:
msg.contentType = 13
msg.contentMetadata = {'mid': kimid}
ki.sendMessage(msg)
elif "Bot2" == msg.text:
msg.contentType = 13
msg.contentMetadata = {'mid': ki2mid}
ki2.sendMessage(msg)
elif msg.text in ["Bot1 Gift","Bot1 gift"]:
msg.contentType = 9
msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020',
'PRDTYPE': 'THEME',
'MSGTPL': '2'}
msg.text = None
ki.sendMessage(msg)
elif msg.text in ["Gift","gift"]:
msg.contentType = 9
msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020',
'PRDTYPE': 'THEME',
'MSGTPL': '3'}
msg.text = None
cl.sendMessage(msg)
elif msg.text in ["Bot2 Gift","Bot2 gift"]:
msg.contentType = 9
msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020',
'PRDTYPE': 'THEME',
'MSGTPL': '3'}
msg.text = None
ki2.sendMessage(msg)
elif msg.text in ["B Cancel","Cancel dong","B cancel"]:
if msg.toType == 2:
group = ki.getGroup(msg.to)
if group.invitee is not None:
gInviMids = [contact.mid for contact in group.invitee]
ki.cancelGroupInvitation(msg.to, gInviMids)
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"No invites๐")
else:
cl.sendText(msg.to,"Invite people inside not๐")
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Tidak ada undangan")
else:
cl.sendText(msg.to,"invitan tidak ada")
elif msg.text in ["Cancel","cancel"]:
if msg.toType == 2:
group = cl.getGroup(msg.to)
if group.invitee is not None:
gInviMids = [contact.mid for contact in group.invitee]
cl.cancelGroupInvitation(msg.to, gInviMids)
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"No invites๐")
else:
cl.sendText(msg.to,"Invite people inside not๐")
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Tidak ada undangan๐")
else:
cl.sendText(msg.to,"invitan tidak ada")
#elif "gurl" == msg.text:
#print cl.getGroup(msg.to)
##cl.sendMessage(msg)
elif msg.text in ["Link on"]:
if msg.toType == 2:
group = cl.getGroup(msg.to)
group.preventJoinByTicket = False
cl.updateGroup(group)
if wait["lang"] == "JP":
cl.sendText(msg.to,"URL open")
else:
cl.sendText(msg.to,"URL open")
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"It can not be used outside the group รดโฌลยรดโฌโโฐ๐")
else:
cl.sendText(msg.to,"Can not be used for groups other than รดโฌลยรดโฌโโฐ")
elif msg.text in ["Link off"]:
if msg.toType == 2:
group = cl.getGroup(msg.to)
group.preventJoinByTicket = True
cl.updateGroup(group)
if wait["lang"] == "JP":
cl.sendText(msg.to,"URL close๐")
else:
cl.sendText(msg.to,"URL close๐")
else:
if wait["lang"] == "JP":
cl.sendText(msg.to,"It can not be used outside the group ๐")
else:
cl.sendText(msg.to,"Can not be used for groups other than รดโฌลย")
elif "Ginfo" == msg.text:
ginfo = cl.getGroup(msg.to)
try:
gCreator = ginfo.creator.displayName
except:
gCreator = "Error"
if wait["lang"] == "JP":
if ginfo.invitee is None:
sinvitee = "0"
else:
sinvitee = str(len(ginfo.invitee))
msg.contentType = 13
msg.contentMetadata = {'mid': ginfo.creator.mid}
cl.sendText(msg.to,"[Nama]\n" + str(ginfo.name) + "\n[Group Id]\n" + msg.to + "\n\n[Group Creator]\n" + gCreator + "\n\nAnggota:" + str(len(ginfo.members)) + "\nInvitation:" + sinvitee + "")
cl.sendMessage(msg)
elif "Contact" == msg.text:
msg.contentType = 13
msg.contentMetadata = {'mid': msg.to}
cl.sendMessage(msg)
elif "Mymid" == msg.text:
cl.sendText(msg.to,mid)
elif "Pb1 mid" == msg.text:
ki.sendText(msg.to,kimid)
elif "Pb2 mid" == msg.text:
ki2.sendText(msg.to,ki2mid)
elif "Pb3 mid" == msg.text:
ki3.sendText(msg.to,kimid)
elif "Pb4 mid" == msg.text:
ki4.sendText(msg.to,ki2mid)
elif "Pb5 mid" == msg.text:
ki5.sendText(msg.to,kimid)
elif "Pb6 mid" == msg.text:
ki6.sendText(msg.to,ki2mid)
elif "all mid" == msg.text:
ki.sendText(msg.to,kimid)
ki2.sendText(msg.to,ki2mid)
ki3.sendText(msg.to,ki3mid)
ki4.sendText(msg.to,ki4mid)
ki5.sendText(msg.to,ki5mid)
ki6.sendText(msg.to,ki5mid)
elif "TL:" in msg.text:
tl_text = msg.text.replace("TL:","")
cl.sendText(msg.to,"line://home/post?userMid="+mid+"&postId="+cl.new_post(tl_text)["result"]["post"]["postInfo"]["postId"])
elif "All:" in msg.text:
string = msg.text.replace("All:","")
if len(string.decode('utf-8')) <= 20:
profile = ki.getProfile()
profile.displayName = string
ki.updateProfile(profile)
elif "Allbio:" in msg.text:
string = msg.text.replace("Allbio:","")
if len(string.decode('utf-8')) <= 500:
profile = ki.getProfile()
profile.statusMessage = string
ki.updateProfile(profile)
elif "Myname:" in msg.text:
string = msg.text.replace("Myname:","")
if len(string.decode('utf-8')) <= 20:
profile = cl.getProfile()
profile.displayName = string
cl.updateProfile(profile)
cl.sendText(msg.to,"๔๔๔ฟฟUpdate Names๐ " + string + "๐")
#-------------Fungsi Tag All Start---------------#
elif msg.text in ["Cipok","Tagall"]:
group = cl.getGroup(msg.to)
nama = [contact.mid for contact in group.members]
cb = ""
cb2 = ""
strt = int(0)
akh = int(0)
for md in nama:
akh = akh + int(6)
cb += """{"S":"""+json.dumps(str(strt))+""","E":"""+json.dumps(str(akh))+""","M":"""+json.dumps(md)+"},"""
strt = strt + int(7)
akh = akh + 1
cb2 += "@nrik \n"
cb = (cb[:int(len(cb)-1)])
msg.contentType = 0
msg.text = cb2
msg.contentMetadata ={'MENTION':'{"MENTIONEES":['+cb+']}','EMTVER':'4'}
try:
cl.sendMessage(msg)
except Exception as error:
print error
#-------------Fungsi Tag All Finish---------------#
#---------------------------------------------------------
elif "1name:" in msg.text:
string = msg.text.replace("1name:","")
if len(string.decode('utf-8')) <= 20:
profile = ki.getProfile()
profile.displayName = string
cl.updateProfile(profile)
cl.sendText(msg.to,"๔๔๏ฟฝ๏ฟฝUpdate Names๐" + string + "๐")
#--------------------------------------------------------
elif "2name:" in msg.text:
string = msg.text.replace("2name:","")
if len(string.decode('utf-8')) <= 20:
profile = ki2.getProfile()
profile.displayName = string
ki.updateProfile(profile)
ki.sendText(msg.to,"๔๔๔ฟฟUpdate Names๐" + string + "๐")
#---------------------------------------------------------
elif "Mid:" in msg.text:
mmid = msg.text.replace("Mid:","")
msg.contentType = 13
msg.contentMetadata = {"mid":mmid}
cl.sendMessage(msg)
elif msg.text.lower() == 'contact on':
if wait["contact"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Sudah On")
else:
cl.sendText(msg.to,"It is already open")
else:
wait["contact"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already open ๐")
else:
cl.sendText(msg.to,"It is already open ๔๔๔ฟฟ")
elif msg.text.lower() == 'contact off':
if wait["contact"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"sudah off รดโฌลยรดโฌโโฐ๐")
else:
cl.sendText(msg.to,"It is already off รดโฌลยรดโฌโโฐ๐")
else:
wait["contact"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"off รดโฌลยรดโฌโโฐalready")
else:
cl.sendText(msg.to,"already Close รดโฌลยรดโฌโโฐ๐")
elif msg.text.lower() == 'protect on':
if wait["protect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Ini sudah on ๔๔๔ฟฟ๐")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka รดโฌยจย๐")
else:
wait["protect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already ON๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already On รดโฌยจย")
elif msg.text.lower() == 'qrprotect on':
if wait["linkprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Ini sudah on ๔๔๏ฟฝ๏ฟฝ๐")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka รดโฌยจย๐")
else:
wait["linkprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already ON๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already On รดโฌยจย")
elif msg.text.lower() == 'inviteprotect on':
if wait["inviteprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Ini sudah on ๔๔๔ฟฟ๐")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka รดโฌยจ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๐")
else:
wait["inviteprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already ON๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already On รดโฌยจย")
elif msg.text.lower() == 'cancelprotect on':
if wait["cancelprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Ini sudah on ๔๔๔ฟฟ๐")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka รดโฌยจย๐")
else:
wait["cancelprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already ON๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already On รดโฌยจย")
elif msg.text.lower() == 'auto join on':
if wait["autoJoin"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Ini sudah off ๔๔๔ฟฟ๐")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka รดโฌยจย๐")
else:
wait["autoJoin"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"already ON๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already On รดโฌยจย")
elif msg.text.lower() == 'blocklist':
blockedlist = cl.getBlockedContactIds()
cl.sendText(msg.to, "Please wait...")
kontak = cl.getContacts(blockedlist)
num=1
msgs="User Blocked List\n"
for ids in kontak:
msgs+="\n%i. %s" % (num, ids.displayName)
num=(num+1)
msgs+="\n\nTotal %i blocked user(s)" % len(kontak)
cl.sendText(msg.to, msgs)
elif msg.text in ["Allprotect on","Mode on"]:
if msg.from_ in admin:
if wait["inviteprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
else:
cl.sendText(msg.to,"")
else:
wait["inviteprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
if wait["cancelprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
else:
cl.sendText(msg.to,"")
else:
wait["cancelprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
if wait["protect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
else:
cl.sendText(msg.to,"")
else:
wait["protect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
else:
cl.sendText(msg.to,"")
if wait["linkprotect"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"")
else:
cl.sendText(msg.to,"")
else:
wait["linkprotect"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"Already On")
else:
cl.sendText(msg.to,"done")
elif msg.text in ["Allprotect off","Mode Off"]:
if msg.from_ in admin:
if wait["inviteprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect Invite Off")
else:
cl.sendText(msg.to,"Invite OFF")
else:
wait["inviteprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect Invite Off")
if wait["cancelprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect Cancel Off")
else:
cl.sendText(msg.to,"done")
else:
wait["cancelprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect Cancel Off")
if wait["protect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Block Off")
else:
cl.sendText(msg.to,"done")
else:
wait["protect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Block Off")
else:
cl.sendText(msg.to,"done")
if wait["linkprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect QR Off")
else:
cl.sendText(msg.to,"done")
else:
wait["linkprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Protect QR Off")
else:
cl.sendText(msg.to,"done")
elif msg.text.lower() == 'auto join off':
if wait["autoJoin"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Auto Join Already Off")
else:
cl.sendText(msg.to,"Auto Join set off")
else:
wait["autoJoin"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"already close")
else:
cl.sendText(msg.to,"It is already open รดโฌลย๐")
elif msg.text in ["Protect off"]:
if wait["protect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"hall ini sudah off รดโฌลย๐")
else:
cl.sendText(msg.to,"sudah dimatikan รดโฌลยรดโฌโโฐ๐")
else:
wait["protect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"already close")
else:
cl.sendText(msg.to,"It is already open รดโฌลย๐")
elif msg.text in ["Qrprotect off","qrprotect off"]:
if wait["linkprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"hall ini sudah off รดโฌลย๐")
else:
cl.sendText(msg.to,"sudah dimatikan รดโฌลยรดโฌโโฐ๐")
else:
wait["linkprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"already close")
else:
cl.sendText(msg.to,"It is already open รดโฌลย๐")
elif msg.text in ["Inviteprotect off"]:
if wait["inviteprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"hall ini sudah off รดโฌลย๐")
else:
cl.sendText(msg.to,"sudah dimatikan รดโฌลยรดโฌโโฐ๐")
else:
wait["inviteprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"already close")
else:
cl.sendText(msg.to,"It is already open รดโฌลย๐")
elif msg.text in ["Cancelprotect off"]:
if wait["cancelprotect"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"hall ini sudah off รดโฌลย๐")
else:
cl.sendText(msg.to,"sudah dimatikan รดโฌลยรดโฌโโฐ๐")
else:
wait["cancelprotect"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"already close")
else:
cl.sendText(msg.to,"It is already open รดโฌลย๐")
elif "Group cancel:" in msg.text:
try:
strnum = msg.text.replace("Group cancel:","")
if strnum == "off":
wait["autoCancel"]["on"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Itu off undangan ditolak๐\nSilakan kirim dengan menentukan jumlah orang ketika Anda menghidupkan๐")
else:
cl.sendText(msg.to,"Off undangan ditolak๐Sebutkan jumlah terbuka ketika Anda ingin mengirim")
else:
num = int(strnum)
wait["autoCancel"]["on"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,strnum + "Kelompok berikut yang diundang akan ditolak secara otomatis๐")
else:
cl.sendText(msg.to,strnum + "The team declined to create the following automatic invitation")
except:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Nilai tidak benar๐")
else:
cl.sendText(msg.to,"Weird value๐ก")
elif msg.text in ["Auto leave on","Auto leave: on"]:
if wait["leaveRoom"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"on๐๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"Sudah terbuka ๔๔๔ฟฟ")
else:
wait["leaveRoom"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"Done๐๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"Is already open๐๔๔๔ฟฟ")
elif msg.text in ["Auto leave off","Auto leave: off"]:
if wait["leaveRoom"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"on๐๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"Sudah off๐๔๔๔ฟฟ")
else:
wait["leaveRoom"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Done๐๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"Is already close๐๔๔๔ฟฟ")
elif msg.text in ["Share on","share on"]:
if wait["timeline"] == True:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Done ๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"Hal ini sudah terbuka๐")
else:
wait["timeline"] = True
if wait["lang"] == "JP":
cl.sendText(msg.to,"on๐")
else:
cl.sendText(msg.to,"on๐")
elif msg.text in ["Share off","share off"]:
if wait["timeline"] == False:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Done๐๔๔๔ฟฟ")
else:
cl.sendText(msg.to,"It is already turned off ๔๔๔ฟฟ๐")
else:
wait["timeline"] = False
if wait["lang"] == "JP":
cl.sendText(msg.to,"Off๐")
else:
cl.sendText(msg.to,"Off๐")
elif msg.text.lower() == 'set':
md = ""
if wait["contact"] == True: md+="๔๔๔ฟฟ Contact:on ๔๔ฏ๔ฟฟ\n"
else: md+="๔๔๔ฟฟ Contact:off๔๔ฐ๔ฟฟ\n"
if wait["autoJoin"] == True: md+="๔๔๔ฟฟ Auto Join:on ๔๔ฏ๔ฟฟ\n"
else: md +="๔๔๔ฟฟ Auto Join:off๔๔ฐ๔ฟฟ\n"
if wait["autoCancel"]["on"] == True:md+="๔๔๔ฟฟ Auto cancel:" + str(wait["autoCancel"]["members"]) + "๔๔ฏ๔ฟฟ\n"
else: md+= "๔๔๔ฟฟ Group cancel:off ๔๔ฐ๔ฟฟ\n"
if wait["leaveRoom"] == True: md+="๔๔๔ฟฟ Auto leave:on ๔๔ฏ๔ฟฟ\n"
else: md+="๔๔๔ฟฟ Auto leave:off ๔๔ฐ๔ฟฟ\n"
if wait["timeline"] == True: md+="๔๔๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ Share:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Share:off ๔๔ฐ๔ฟฟ\n"
if wait["autoAdd"] == True: md+="๔๔๔ฟฟ Auto add:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Auto add:off ๔๔ฐ๔ฟฟ\n"
if wait["commentOn"] == True: md+="๔๔๔ฟฟ Auto komentar:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Auto komentar:off ๔๔ฐ๔ฟฟ\n"
if wait["protect"] == True: md+="๔๔๔ฟฟ Protect:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Protect:off ๔๔ฐ๔ฟฟ\n"
if wait["linkprotect"] == True: md+="๔๔๔ฟฟLink Protect:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Link Protect:off ๔๔ฐ๔ฟฟ\n"
if wait["inviteprotect"] == True: md+="๔๔๔ฟฟInvitation Protect:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Invitation Protect:off ๔๔ฐ๔ฟฟ\n"
if wait["cancelprotect"] == True: md+="๔๔๔ฟฟCancel Protect:on ๔๔ฏ๔ฟฟ\n"
else:md+="๔๔๔ฟฟ Cancel Protect:off ๔๔ฐ๔ฟฟ\n"
cl.sendText(msg.to,md)
msg.contentType = 13
msg.contentMetadata = {'mid': admsa}
cl.sendMessage(msg)
elif msg.text.lower() == 'me':
msg.contentType = 13
msg.contentMetadata = {'mid': mid}
cl.sendMessage(msg)
elif cms(msg.text,["creator","Creator"]):
msg.contentType = 13
msg.contentMetadata = {'mid': admsa}
cl.sendText(msg.to,"๔๔๔ฟฟ My Creator ๔๔๔ฟฟ ")
cl.sendMessage(msg)
cl.sendText(msg.to,"๔๔๔ฟฟ Dont Kick out From group ๔๔๔ฟฟ ")
elif msg.text in ["Cancelall"]:
if msg.from_ in admin:
gid = cl.getGroupIdsInvited()
for i in gid:
cl.rejectGroupInvitation(i)
if wait["lang"] == "JP":
cl.sendText(msg.to,"All invitations have been refused")
else:
cl.sendText(msg.to,"รฆโนโรงยปยรคยบโ รฅโฆยจรฉฦยจรงลกโรฉโโฌรจยฏยทรฃโฌโ")
elif "Set album:" in msg.text:
gid = msg.text.replace("Set album:","")
album = cl.getAlbum(gid)
if album["result"]["items"] == []:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Tidak ada album๐")
else:
cl.sendText(msg.to,"Dalam album tidak๐")
else:
if wait["lang"] == "JP":
mg = "Berikut ini adalah album dari target"
else:
mg = "Berikut ini adalah subjek dari album"
for y in album["result"]["items"]:
if "photoCount" in y:
mg += str(y["title"]) + ":" + str(y["photoCount"]) + "รฆลพลก\n"
else:
mg += str(y["title"]) + ":0 Pieces\n"
cl.sendText(msg.to,mg)
elif "Album" in msg.text:
gid = msg.text.replace("Album","")
album = cl.getAlbum(gid)
if album["result"]["items"] == []:
if wait["lang"] == "JP":
cl.sendText(msg.to,"Tidak ada album")
else:
cl.sendText(msg.to,"Dalam album tidak")
else:
if wait["lang"] == "JP":
mg = "Berikut ini adalah album dari target"
else:
mg = "Berikut ini adalah subjek dari album"
for y in album["result"]["items"]:
if "photoCount" in y:
mg += str(y["title"]) + ":" + str(y["photoCount"]) + "\n"
else:
mg += str(y["title"]) + ":0 pieces\n"
elif "Hapus album " in msg.text:
gid = msg.text.replace("Hapus album ","")
albums = cl.getAlbum(gid)["result"]["items"]
i = 0
if albums != []:
for album in albums:
cl.deleteAlbum(gid,album["gid"])
i += 1
if wait["lang"] == "JP":
cl.sendText(msg.to,str(i) + "Soal album telah dihapus")
else:
cl.sendText(msg.to,str(i) + "Hapus kesulitan album๐ก")
elif msg.text.lower() == 'group id':
gid = cl.getGroupIdsJoined()
h = ""
for i in gid:
h += "[%s]:%s\n" % (cl.getGroup(i).name,i)
cl.sendText(msg.to,h)
elif msg.text in ["Bot out"]:
gid = cl.getGroupIdsJoined()
gid = ki.getGroupIdsJoined()
gid = ki2.getGroupIdsJoined()
for i in gid:
ki.leaveGroup(i)
ki2.leaveGroup(i)
ki7.leaveGroup(i)
if wait["lang"] == "JP":
cl.sendText(msg.to,"Bot Sudah Keluar Di semua grup")
else:
cl.sendText(msg.to,"He declined all invitations")
elif "Album deleted:" in msg.text:
gid = msg.text.replace("Album deleted:","")
albums = cl.getAlbum(gid)["result"]["items"]
i = 0
if albums != []:
for album in albums:
cl.deleteAlbum(gid,album["id"])
i += 1
if wait["lang"] == "JP":
cl.sendText(msg.to,str(i) + "Soal album telah dihapus๐")