-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnewfile3.py
1854 lines (1800 loc) · 93.8 KB
/
newfile3.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 -*-
from linepy import *
from akad.ttypes import *
from multiprocessing import Pool, Process
from datetime import datetime
from bs4 import BeautifulSoup
from gtts import gTTS
from googletrans import Translator
import time,random,sys,json,codecs,threading,glob,re,os,subprocess
from datetime import datetime, timedelta
from humanfriendly import format_timespan, format_size, format_number, format_length
import requests
import datetime
import requests,urllib,json
#Khusus Login Qr
#ririn = LINE()
#ririn.log("Auth Token : " + str(ririn.authToken))
#ririn.log("Timeline Token : " + str(ririn.tl.channelAccessToken))
#Khusus Login Token (Chrome)
ririn = LINE('Es8F9rvfe5qWM1OyBUKd.UC8K+GXOvK/3A1WWSKmQRq.Ks5f57uNaBJYk8ZYbbM5KSJahM913pRZJI7AoATs9pQ=')
ririn.log("Auth Token : " + str(ririn.authToken))
ririn.log("Timeline Token : " + str(ririn.tl.channelAccessToken))
dna1 = LINE('Esn9u0ubtOSNbrvmZRj2.We7lj7PxgwBQ8O07ppSHuG.yZgTUBb0XWQeIuEeEcOTxrVcnWfEXOKs0ecytY8Ungk=')
dna1.log("Auth Token : " + str(dna1.authToken))
dna1.log("Timeline Token : " + str(dna1.tl.channelAccessToken))
dna2 = LINE('EswPaA5BOBJTsJYOn671.Sl2u8yHwWYZHMslzI9Bi8q.20nDyP69BtbKbjSH0g+Az8JIhjkvKDyF5cnu+TLbWJc=')
dna2.log("Auth Token : " + str(dna2.authToken))
dna2.log("Timeline Token : " + str(dna2.tl.channelAccessToken))
dna3 = LINE('EsEKNt02EJOcnTi6Xzx8.M53qiD/PJ1i6qsVfYwB7Ea.NaLIAwjUUJL6CgB0EDUFAPFuGYBt1Tfnu+Di90xex+w=')
dna3.log("Auth Token : " + str(dna3.authToken))
dna3.log("Timeline Token : " + str(dna3.tl.channelAccessToken))
dna4 = LINE('EsW1g9iNsbBlMKijNfg3.LTjIccO9HW0I2OLJ9e3wmW.mvP+mX2apHj/j8NBNUX/V2mNidEVhpOwAGUyCcNSSDI=')
dna4.log("Auth Token : " + str(dna4.authToken))
dna4.log("Timeline Token : " + str(dna4.tl.channelAccessToken))
dna5 = LINE('EsuIBccvd1yt4fKYcMua.i4cphH9h9VMs4DyAsZSSsG.6dh1FLhE4KKi6AS/yTbG5hYIAd2ZEn5SW2gaOUenUTs=')
dna5.log("Auth Token : " + str(dna5.authToken))
dna5.log("Timeline Token : " + str(dna5.tl.channelAccessToken))
dna6 = LINE('Esrt47QpyN5xDpEI9q7a.fW/HXK/P6ucyNSYHd42E2G.IfXCDZecGl9VI8YP70o5nXE+BVa1MPJ/RArJyIzm7fg=')
dna6.log("Auth Token : " + str(dna6.authToken))
dna6.log("Timeline Token : " + str(dna6.tl.channelAccessToken))
dna7 = LINE('EsUm82oDONrrROSjd0o3.GQe1F0FLgkB3suGK5WtUCW.H1Mt8JrAr6MOcF/Jey5dYH62txLV9EUeC7kpIy7xbI8=')
dna7.log("Auth Token : " + str(dna7.authToken))
dna7.log("Timeline Token : " + str(dna7.tl.channelAccessToken))
dna8 = LINE('EsxzQWuDsnqvc6umvf13.fOtS1/ZYrVfyY2wr74a3uW.5NYRTH6X2K+wXUVCetEqGUoqhqMZEZfh9iY/yY/NeH8=')
dna8.log("Auth Token : " + str(dna8.authToken))
dna8.log("Timeline Token : " + str(dna8.tl.channelAccessToken))
dna9 = LINE('EsCbkUtvMVAsXQ6h0Vj1./PGYhVVe4uDle5Q6kp48qq.QdI0wcEL/lGgxXLSRWgiHGqtblWKBVsv1pw+H+jnqoM=')
dna9.log("Auth Token : " + str(dna9.authToken))
dna9.log("Timeline Token : " + str(dna9.tl.channelAccessToken))
dna10 = LINE('Es0Dc6tTZLGHWLdjLoj5.qzjQVWZ0ZEOc9BUr4r9zrq.53ywR6urnzMdrRTfoFuFUXmX92L79AkrN/LPysGzdVg=') #Ghost
dna10.log("Auth Token : " + str(dna10.authToken))
dna10.log("Timeline Token : " + str(dna10.tl.channelAccessToken))
startBot = time.time()
elapsed_time = format_timespan(time.time()-startBot)
helpMessage ="""
╔════════════════════╗
✰ ᴅɴᴀ ʙᴏᴛ ✰
╚════════════════════╝
╔════════════════════╗
◄]·✪·Public·✪·[►
╠════════════════════╝
╠❂➣ ɪᴅ
╠❂➣ ᴍᴇ
╠❂➣ ᴍʏ ᴍɪᴅ
╠❂➣ ɢɪɴғᴏ
╠❂➣ ᴛᴀɢᴀʟʟ
╠❂➣ ʀᴇsᴘᴏɴ
╠❂➣ ᴀʙsᴇɴ
╠❂➣ ᴅɴᴀ
╠❂➣ sᴘ
╠❂➣ sᴘᴇᴇᴅ
╠❂➣ ᴀᴅᴍɪɴʟɪsᴛ
╠❂➣ ᴏᴡɴᴇʀʟɪsᴛ
╠❂➣ ᴀʙᴏᴜᴛ
╠════════════════════╗
◄]·✪·Admin·✪·[►
╠════════════════════╝
╠❂➣ ɢɴ 「ᴛᴇxᴛ」
╠❂➣ ᴏᴜʀʟ/ʙᴜᴋᴀ ǫʀ
╠❂➣ ᴄᴜʀʟ/ᴛᴜᴛᴜᴘ ǫʀ
╠❂➣ ᴘʀᴏǫʀ 「ᴏɴ/ᴏғғ」
╠❂➣ ᴘʀᴏᴊᴏɪɴ 「ᴏɴ/ᴏғғ」
╠❂➣ ᴘʀᴏɪɴᴠɪᴛᴇ 「ᴏɴ/ᴏғғ」
╠❂➣ ᴘʀᴏᴄᴀɴᴄᴇʟ 「ᴏɴ/ᴏғғ」
╠❂➣ ᴄᴏɴᴛᴀᴄᴛ 「ᴏɴ/ᴏғғ」
╠❂➣ sɪᴅᴇʀ 「ᴏɴ/ᴏғғ」
╠❂➣ ɪɴᴠɪᴛᴇᴍɪᴅ 「ᴍɪᴅ」
╠❂➣ ɪɴᴠɪᴛᴇ 「ᴄᴏɴᴛᴀᴄᴛ」
╠❂➣ ʙᴀɴ 「ᴄᴏɴᴛᴀᴄᴛ」
╠❂➣ ᴜɴʙᴀɴ 「ᴄᴏɴᴛᴀᴄᴛ」
╠❂➣ ʙᴀɴ 「ᴍᴇɴᴛɪᴏɴ」
╠❂➣ ᴜɴʙᴀɴ 「ᴍᴇɴᴛɪᴏɴ」
╠❂➣ ɴᴋ 「ᴍᴇɴᴛɪᴏɴ」
╠❂➣ sᴛᴇᴀʟ 「ᴍᴇɴᴛɪᴏɴ」
╠❂➣ ᴄʟᴇᴀʀ ʙᴀɴ
╠❂➣ ʙᴀɴʟɪsᴛ
╠❂➣ ᴋɪʟʟ ʙᴀɴ
╠❂➣ ᴄᴀɴᴄᴇʟᴀʟʟ
╠❂➣ ʙʏᴇ ᴅɴᴀ
╠❂➣ ʙʏᴇ ᴀʟʟ
╠❂➣ sᴇᴛ/sᴛᴀᴛᴜs
╠════════════════════╗
◄]·✪·Owner·✪·[►
╠════════════════════╝
╠❂➣ ɢʟɪsᴛ
╠❂➣ ɢʀᴏᴜᴘ ɪᴅ
╠❂➣ ʀᴇsᴛᴀʀᴛ
╠❂➣ ᴀᴜᴛᴏ ᴊᴏɪɴ:「ᴏɴ/ᴏғғ」
╠❂➣ ɢᴄᴀɴᴄᴇʟ
╠❂➣ ʟᴇᴀᴠᴇ 「ᴏɴ/ᴏғғ」
╠❂➣ sʜᴀʀᴇ 「ᴏɴ/ᴏғғ」
╠❂➣ ᴀᴜᴛᴏ ᴀᴅᴅ:「ᴏɴ/ᴏғғ」
╠❂➣ ᴄᴏᴍᴇ ᴅɴᴀ
╠❂➣ ɢʀᴏᴜᴘ ʙᴄ 「ᴛᴇxᴛ」
╠❂➣ ʀᴜɴᴛɪᴍᴇ
╠════════════════════╗
Credits by : D̶e̶e̶ ✯
╚════════════════════╝
╔════════════════════╗
✰ ᴅɴᴀ ʙᴏᴛ ✰
╚════════════════════╝
"""
oepoll = OEPoll(ririn)
KAC=[ririn,dna1,dna2,dna3,dna4,dna5,dna6,dna7,dna8,dna9]
mid = ririn.getProfile().mid
Amid = dna1.getProfile().mid
Bmid = dna2.getProfile().mid
Cmid = dna3.getProfile().mid
Dmid = dna4.getProfile().mid
Emid = dna5.getProfile().mid
Fmid = dna6.getProfile().mid
Gmid = dna7.getProfile().mid
Hmid = dna8.getProfile().mid
Imid = dna9.getProfile().mid
Jmid = dna10.getProfile().mid
responsename = ririn.getProfile().displayName
responsename2 = dna1.getProfile().displayName
responsename3 = dna2.getProfile().displayName
responsename4 = dna3.getProfile().displayName
responsename5 = dna4.getProfile().displayName
responsename6 = dna5.getProfile().displayName
responsename7 = dna6.getProfile().displayName
responsename8 = dna7.getProfile().displayName
responsename9 = dna8.getProfile().displayName
responsename10 = dna9.getProfile().displayName
responsename11 = dna10.getProfile().displayName
Bots=[mid,Amid,Bmid,Cmid,Dmid,Emid,Fmid,Gmid,Hmid,Imid,Jmid]
admin=["ueca4120a9d7b0e4a9e7f4f1b1b96a436","u40d66b1f1c5ce30fdce9507a73247ef1","uc2d366327a79c98701b0b8bd9e08c0c9","ubcce0f23f428d75703fb33ee06c083b6","ubd3c3fa2c0128918d5b484caa42f9fee","u6fc2dc5f5f0d0fc6a4d2e92626afb742"]
Owner=["ueca4120a9d7b0e4a9e7f4f1b1b96a436"]
creator=["ueca4120a9d7b0e4a9e7f4f1b1b96a436"]
wait = {
'message':"ᴛʜᴀɴᴋs ғᴏʀ ᴀᴅᴅ ᴍᴇ \nᴅɴᴀ ʙᴏᴛ \nᴏᴘᴇɴ ᴏʀᴅᴇʀ ʙᴏᴛ ᴘʀᴏᴛᴇᴄᴛ ᴘʏᴛʜᴏɴ 3 \nᴍɪɴᴀᴛ ᴘᴄ ᴀᴋᴜɴ ᴅɪ ʙᴀᴡᴀʜ \nᴄʀᴇᴀᴛᴏʀ line.me/ti/p/ppgIZ0JLDW",
'autoAdd':True,
'detectMention':True,
'leaveRoom':True,
'timeline':True,
'contact':False,
'kickMention':False,
'autoAdd':True,
'autoCancel':{"on":True,"members":5},
"comment":"ᴀᴜᴛᴏ ʟɪᴋᴇ ʙʏ : \nᴅɴᴀ ʙᴏᴛ \nᴏᴘᴇɴ ᴏʀᴅᴇʀ ʙᴏᴛ ᴘʀᴏᴛᴇᴄᴛ ᴘʏᴛʜᴏɴ 3 \nᴍɪɴᴀᴛ ᴘᴄ ᴀᴋᴜɴ ᴅɪ ʙᴀᴡᴀʜ \nᴄʀᴇᴀᴛᴏʀ line.me/ti/p/ppgIZ0JLDW",
"lang":"JP",
"ProtectQR":True,
"autoJoin":True,
"atjointicket":True,
"ProtectInvite":True,
"Protectcancel":True,
"CloseQR":True,
"commentOn":True,
"cName":"✰ ᴅɴᴀ ʙᴏᴛ ✰",
"cName2":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName3":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName4":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName5":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName6":"✰ ᴅɴᴀ ʙᴏᴛ ✰",
"cName7":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName8":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName9":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"cName10":"✰ ᴅɴᴀ ʙᴏᴛ ✰ ",
"likeOn":{},
"blacklist":{},
"whitelist":{},
"invite":{},
"commentBlack":{},
"Sider":{},
"ProtectJoin":False,
"wblack":False,
"dblack":False,
"wblacklist":False,
"dblacklist":False,
"contact":False,
"alwaysRead":False,
}
cctv = {
"cyduk":{},
"point":{},
"sidermem":{}
}
wait2 = {
"readPoint":{},
"readMember":{},
"setTime":{},
"ROM":{}
}
setTime = {}
setTime = wait2['setTime']
#---------------------------------------------------------------------------------------------------#
#----------------------------------------------=Def=--------------------------------------------#
#---------------------------------------------------------------------------------------------------#
#-----------------------Restart-----------------------#
def restart_program():
python = sys.executable
os.execl(python, python, * sys.argv)
#-----------------Read Message-----------------#
def NOTIFIED_READ_MESSAGE(op):
try:
if op.param1 in wait2["readPoint"]:
Name = ririn.getContact(op.param2).displayName
if Name in wait2["readMember"][op.param1]:
pass
else:
wait2["readMember"][op.param1] += "\n・" + Name
wait2["ROM"][op.param1][op.param2] = "・" + Name
else:
pass
except:
pass
#-----------------------Mention----------------------#
def sendMessageWithMention(to, mid):
try:
aa = '{"S":"0","E":"3","M":'+json.dumps(mid)+'}'
text_ = '@x '
ririn.sendMessage(to, text_, contentMetadata={'MENTION':'{"MENTIONEES":['+aa+']}'}, contentType=0)
except Exception as error:
logError(error)
#------------------Detect Mention-----------------#
if 'MENTION' in msg.contentMetadata.keys() != None:
if wait['detectMention'] == True:
contact = ririn.getContact(msg._from)
cName = contact.displayName
balas = ["sᴇᴋᴀʟɪ ʟᴀɢɪ ɴɢᴇ ᴛᴀɢ ɢᴡ sᴜᴍᴘᴀʜɪɴ ᴊᴏᴍʙʟᴏ sᴇᴜᴍᴜʀ ʜɪᴅᴜᴘ!","ᴅᴏɴᴛ ᴛᴀɢ!! ʟᴀɢɪ sɪʙᴜᴋ",cName + " ɴɢᴀᴘᴀɪɴ ɴɢᴇᴛᴀɢ?",cName + " ɴɢɢᴀᴋ ᴜsᴀʜ ᴛᴀɢ-ᴛᴀɢ! ᴋᴀʟᴏ ᴘᴇɴᴛɪɴɢ ʟᴀɴɢsᴜɴɢ ᴘᴄ ᴀᴊᴀ","ᴛᴀɢ ᴍᴜʟᴜ ʟᴏ ᴀɴᴊɪʀʀ!","ᴅɪᴀ ʟᴀɢɪ ᴏғғ", cName + " ᴋᴇɴᴀᴘᴀ ᴛᴀɢ? ᴋᴀɴɢᴇɴ?","ᴅɪᴀ ʟᴀɢɪ ᴛɪᴅᴜʀ\nᴊᴀɴɢᴀɴ ᴅɪ ᴛᴀɢ " + cName, "ᴊᴀɴɢᴀɴ sᴜᴋᴀ ᴛᴀɢ ɢᴜᴀ " + cName, "ᴋᴀᴍᴜ sɪᴀᴘᴀ " + cName + "?", "ᴀᴅᴀ ᴘᴇʀʟᴜ ᴀᴘᴀ " + cName + "?","ᴡᴏɪɪ " + cName + " ᴊᴀɴɢᴀɴ ɴɢᴇᴛᴀɢ, ʀɪɪʙᴜᴛ!"]
ret_ = random.choice(balas)
name = re.findall(r'@(\w+)', msg.text)
mention = ast.literal_eval(msg.contentMetadata['MENTION'])
mentionees = mention["MENTIONEES"]
for mention in mentionees:
if mention['M'] in admin:
ririn.sendText(msg.to,ret_)
break
if mention['M'] in Bots:
ririn.sendText(msg.to,ret_)
break
#--------------------Kick Mention-------------------#
if 'MENTION' in msg.contentMetadata.keys() != None:
if wait['kickMention'] == True:
contact = ririn.getContact(msg._from)
cName = contact.displayName
balas = ["ᴀᴋᴜ ʙɪʟᴀɴɢ ᴊᴀɴɢᴀɴ ɴɢᴇᴛᴀɢ ʟᴀɢɪ " + cName + "\nᴀᴋᴜ ᴋɪᴄᴋ ᴋᴀᴍᴜ! sᴏʀʀʏ, ʙʏᴇᴇ!!!"]
ret_ = random.choice(balas)
name = re.findall(r'@(\w+)', msg.text)
mention = ast.literal_eval(msg.contentMetadata['MENTION'])
mentionees = mention["MENTIONEES"]
for mention in mentionees:
if mention['M'] in admin:
ririn.sendText(msg.to,ret_)
random.choice(KAC).kickoutFromGroup(msg.to,[msg._from])
break
if mention['M'] in Bots:
ririn.sendText(msg.to,ret_)
random.choice(KAC).kickoutFromGroup(msg.to,[msg._from])
break
#------End Operation & Add Contact-------#
def bot(op):
try:
if op.type == 0:
return
if op.type == 5:
if wait['autoAdd'] == True:
ririn.findAndAddContactsByMid(op.param1)
if (wait["message"] in [""," ","\n",None]):
pass
else:
ririn.sendText(op.param1,str(wait["message"]))
#--------------Notif Update Group--------------#
if op.type == 11:
if wait["ProtectQR"] == True:
if op.param2 not in admin:
if op.param2 not in Bots:
X = ririn.getGroup(op.param1)
X.preventedJoinByTicket = False
ririn.updateGroup(X)
Ticket = ririn.reissueGroupTicket(op.param1)
dna10.acceptGroupInvitationByTicket(op.param1,Ticket)
dna10.kickoutFromGroup(op.param1,[op.param2])
dna10.leaveGroup(op.param1)
X = dna1.getGroup(op.param1)
X.preventedJoinByTicket = True
dna1.updateGroup(X)
#-------------Induk Invite to Group-------------#
if op.type == 13:
if mid in op.param2:
if wait["autoJoin"] == True:
if op.param2 in Bots:
G = ririn.getGroup(op.param1)
ririn.acceptGroupInvitation(op.param1)
#---------------Invite User Protect---------------#
if op.type == 13:
if wait["ProtectInvite"] == True:
if op.param2 not in admin:
if op.param2 not in Bots:
random.choice(KAC).cancelGroupInvitation(op.param1,[op.param3])
random.choice(KAC).sendText(op.param1, "ᴍᴀᴜ ɴɢᴜɴᴅᴀɴɢ sɪᴀᴘᴀ ᴋᴀ?\nᴋᴋ ʙᴜᴋᴀɴ ᴀᴅᴍɪɴ\nᴊᴀᴅɪ ᴀᴋᴜ ᴄᴀɴᴄᴇʟ😛")
#----------------------Invite Bot------------------------#
if op.type == 13:
if op.param3 in mid:
if op.param2 in Amid:
G = dna1.getGroup(op.param1)
G.preventJoinByTicket = False
dna1.updateGroup(G)
Ticket = dna1.reissueGroupTicket(op.param1)
ririn.acceptGroupInvitationByTicket(op.param1,Ticket)
G.preventJoinByTicket = True
ririn.updateGroup(G)
Ticket = ririn.reissueGroupTicket(op.param1)
if op.param3 in Amid:
if op.param2 in Bmid:
X = dna2.getGroup(op.param1)
X.preventJoinByTicket = False
dna2.updateGroup(X)
Ti = dna2.reissueGroupTicket(op.param1)
dna1.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna1.updateGroup(X)
Ti = dna1.reissueGroupTicket(op.param1)
if op.param3 in Bmid:
if op.param2 in Cmid:
X = dna3.getGroup(op.param1)
X.preventJoinByTicket = False
dna3.updateGroup(X)
Ti = dna3.reissueGroupTicket(op.param1)
dna2.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna2.updateGroup(X)
Ti = dna2.reissueGroupTicket(op.param1)
if op.param3 in Cmid:
if op.param2 in Dmid:
X = dna4.getGroup(op.param1)
X.preventJoinByTicket = False
dna4.updateGroup(X)
Ti = dna4.reissueGroupTicket(op.param1)
dna3.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna3.updateGroup(X)
Ti = dna3.reissueGroupTicket(op.param1)
if op.param3 in Dmid:
if op.param2 in Emid:
X = dna5.getGroup(op.param1)
X.preventJoinByTicket = False
dna5.updateGroup(X)
Ti = dna5.reissueGroupTicket(op.param1)
dna4.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna4.updateGroup(X)
Ti = dna4.reissueGroupTicket(op.param1)
if op.param3 in Emid:
if op.param2 in Fmid:
G = dna6.getGroup(op.param1)
G.preventJoinByTicket = False
dna6.updateGroup(G)
Ticket = dna6.reissueGroupTicket(op.param1)
dna5.acceptGroupInvitationByTicket(op.param1,Ticket)
G.preventJoinByTicket = True
dna5.updateGroup(G)
Ticket = dna5.reissueGroupTicket(op.param1)
if op.param3 in Fmid:
if op.param2 in Gmid:
X = dna7.getGroup(op.param1)
X.preventJoinByTicket = False
dna7.updateGroup(X)
Ti = dna7.reissueGroupTicket(op.param1)
dna6.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna6.updateGroup(X)
Ti = dna6.reissueGroupTicket(op.param1)
if op.param3 in Gmid:
if op.param2 in Hmid:
X = dna8.getGroup(op.param1)
X.preventJoinByTicket = False
dna8.updateGroup(X)
Ti = dna8.reissueGroupTicket(op.param1)
dna7.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna7.updateGroup(X)
Ti = dna7.reissueGroupTicket(op.param1)
if op.param3 in Hmid:
if op.param2 in Imid:
X = dna9.getGroup(op.param1)
X.preventJoinByTicket = False
dna9.updateGroup(X)
Ti = dna9.reissueGroupTicket(op.param1)
dna8.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna8.updateGroup(X)
Ti = dna8.reissueGroupTicket(op.param1)
if op.param3 in Imid:
if op.param2 in mid:
X = ririn.getGroup(op.param1)
X.preventJoinByTicket = False
ririn.updateGroup(X)
Ti = ririn.reissueGroupTicket(op.param1)
dna9.acceptGroupInvitationByTicket(op.param1,Ti)
X.preventJoinByTicket = True
dna9.updateGroup(X)
Ti = dna9.reissueGroupTicket(op.param1)
if op.type == 13:
if mid in op.param3:
G = ririn.getGroup(op.param1)
if wait["autoJoin"] == True:
if wait["autoCancel"]["on"] == True:
if len(G.members) <= wait["autoCancel"]["members"]:
ririn.rejectGroupInvitation(op.param1)
else:
ririn.acceptGroupInvitation(op.param1)
else:
ririn.acceptGroupInvitation(op.param1)
elif wait["autoCancel"]["on"] == True:
if len(G.members) <= wait["autoCancel"]["members"]:
ririn.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:
ririn.cancelGroupInvitation(op.param1, matched_list)
#-------------Invite User By Contact-------------#
if op.type == 13:
if wait["invite"] == True:
_name = msg.contentMetadata["displayName"]
invite = msg.contentMetadata["mid"]
groups = ririn.getGroup(msg.to)
pending = groups.invitee
targets = []
for s in groups.members:
if _name in s.displayName:
ririn.sendText(msg.to, _name + "sᴜᴅᴀʜ ᴅɪ ᴅᴀʟᴀᴍ ɢʀᴜᴘ")
else:
targets.append(invite)
if targets == []:
pass
else:
for target in targets:
try:
ririn.findAndAddContactsByMid(target)
ririn.inviteIntoGroup(msg.to,[target])
ririn.sendText(msg.to,"Invite" + _name)
wait["invite"] = False
break
except:
ririn.sendText(msg.to,"ᴇʀʀᴏʀ")
wait["invite"] = False
break
else:
if wait["invite"] == True:
_name = msg.contentMetadata["displayName"]
invite = msg.contentMetadata["mid"]
groups = dna1.getGroup(msg.to)
pending = groups.invitee
targets = []
for s in groups.members:
if _name in s.displayName:
dna1.sendText(msg.to, _name + "sᴜᴅᴀʜ ᴅɪ ᴅᴀʟᴀᴍ ɢʀᴜᴘ")
else:
targets.append(invite)
if targets == []:
pass
else:
for target in targets:
try:
dna1.findAndAddContactsByMid(target)
dna1.inviteIntoGroup(msg.to,[target])
dna1.sendText(msg.to,"Invite" + _name)
wait["invite"] = False
break
except:
dna1.sendText(msg.to,"ᴇʀʀᴏʀ")
wait["invite"] = False
break
#----------------Notif Leave Group----------------#
if op.type == 15:
dan = ririn.getContact(op.param2)
tgb = ririn.getGroup(op.param1)
ririn.sendMessage(op.param1, "ɴᴀʜ ᴋᴀɴ ʙᴀᴘᴇʀ {}, ɢᴀᴋ ᴜsᴀʜ ʙᴀʟɪᴋ ᴅɪ {} ʟᴀɢɪ ʏᴀ\nsᴇʟᴀᴍᴀᴛ ᴊᴀʟᴀɴ ᴅᴀɴ sᴇᴍᴏɢᴀʜ ᴛᴇɴᴀɴɢ ᴅɪʟᴜᴀʀ sᴀɴᴀ 😘😘😘".format(str(dan.displayName),str(tgb.name)))
ririn.sendContact(op.param1, op.param2)
ririn.sendImageWithURL(op.param1, "http://dl.profile.line-cdn.net{}".format(dan.picturePath))
#-----------------Notif Join Group------------------#
if op.type == 17:
dan = ririn.getContact(op.param2)
tgb = ririn.getGroup(op.param1)
ririn.sendMessage(op.param1, "ʜᴏʟᴀ {} \nᴡᴇʟᴄᴏᴍᴇ ᴛᴏ ɢʀᴏᴜᴘ {} \nᴊᴀɴɢᴀɴ ʟᴜᴘᴀ ᴄʜᴇᴄᴋ ɴᴏᴛᴇ ʏᴀ \nᴀᴡᴀs ᴋᴀʟᴀᴜ ʙᴀᴘᴇʀᴀɴ😘😘😘".format(str(dan.displayName),str(tgb.name)))
ririn.sendContact(op.param1, op.param2)
ririn.sendImageWithURL(op.param1, "http://dl.profile.line-cdn.net{}".format(dan.picturePath))
#-----------------User Join Kicked-----------------#
if op.type == 17:
if wait["ProtectJoin"] == True:
if op.param2 not in admin:
try:
contact = ririn.getContact(op.param2)
random.choice(KAC).cancelGroupInvitation(op.param1,[op.param2])
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
except Exception as e:
print(e)
#--------------Blacklist Join Kicked---------------#
if op.type == 17:
if op.param2 in wait["blacklist"]:
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
#----------------Blacklist Auto Kick----------------#
if op.type == 19:
if op.param2 not in admin:
if op.param2 not in Bots:
if op.param2 not in wait["whitelist"]:
wait["blacklist"][op.param2] = True
print("kicker kicked")
else:
pass
#---------------------User Kicked---------------------#
if op.type == 19:
if op.param2 not in admin:
if op.param2 not in Bots:
try:
ririn.kickoutFromGroup(op.param1,[op.param2])
except:
try:
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
random.choice(KAC).inviteIntoGroup(op.param1,[op.param3])
except:
print ("User Kick")
#-------------------Admin Kicked--------------------#
if op.type == 19:
if op.param3 in admin:
try:
ririn.kickoutFromGroup(op.param1,[op.param2])
ririn.inviteIntoGroup(op.param1,admin)
except:
try:
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
random.choice(KAC).inviteIntoGroup(op.param1,admin)
except:
print ("Admin Kicked")
#----------------------Bot Kicked----------------------#
if op.type == 19:
if op.param2 in Bots:
pass
if op.param2 in admin:
pass
else:
if op.param3 in mid:
if op.param2 not in Bots or admin:
try:
G = dna9.getGroup(op.param1)
dna9.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna9.updateGroup(G)
Ticket = dna9.reissueGroupTicket(op.param1)
ririn.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
ririn.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
ririn.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Amid:
if op.param2 not in Bots or admin:
try:
G = ririn.getGroup(op.param1)
ririn.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
ririn.updateGroup(G)
Ticket = ririn.reissueGroupTicket(op.param1)
dna1.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna1.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna1.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Bmid:
if op.param2 not in Bots or admin:
try:
G = dna1.getGroup(op.param1)
dna1.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna1.updateGroup(G)
Ticket = dna1.reissueGroupTicket(op.param1)
dna2.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna2.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna2.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Cmid:
if op.param2 not in Bots or admin:
try:
G = dna2.getGroup(op.param1)
dna2.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna2.updateGroup(G)
Ticket = dna2.reissueGroupTicket(op.param1)
dna3.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna3.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna3.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Dmid:
if op.param2 not in Bots or admin:
try:
G = dna3.getGroup(op.param1)
dna3.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna3.updateGroup(G)
Ticket = dna3.reissueGroupTicket(op.param1)
dna4.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna4.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna4.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Emid:
if op.param2 not in Bots or admin:
try:
G = dna4.getGroup(op.param1)
dna4.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna4.updateGroup(G)
Ticket = dna4.reissueGroupTicket(op.param1)
dna5.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna5.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna5.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Fmid:
if op.param2 not in Bots or admin:
try:
G = dna5.getGroup(op.param1)
dna5.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna5.updateGroup(G)
Ticket = dna5.reissueGroupTicket(op.param1)
dna6.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna6.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna6.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Gmid:
if op.param2 not in Bots or admin:
try:
G = dna6.getGroup(op.param1)
dna6.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna6.updateGroup(G)
Ticket = dna6.reissueGroupTicket(op.param1)
dna7.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna7.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna7.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Hmid:
if op.param2 not in Bots or admin:
try:
G = dna7.getGroup(op.param1)
dna7.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna7.updateGroup(G)
Ticket = dna7.reissueGroupTicket(op.param1)
dna8.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna8.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna8.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
if op.param3 in Imid:
if op.param2 not in Bots or admin:
try:
G = dna8.getGroup(op.param1)
dna8.kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
dna8.updateGroup(G)
Ticket = dna8.reissueGroupTicket(op.param1)
dna9.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
dna9.updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
except:
G = random.choice(KAC).getGroup(op.param1)
random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
G.preventedJoinByTicket = False
random.choice(KAC).updateGroup(G)
Ticket = random.choice(KAC).reissueGroupTicket(op.param1)
dna9.acceptGroupInvitationByTicket(op.param1,Ticket)
time.sleep(0.01)
G.preventedJoinByTicket = True
random.choice(KAC).updateGroup(G)
wait["blacklist"][op.param2] = True
f=codecs.open('st2__b.json','w','utf-8')
json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False)
#------------------Notif Invite Room----------------#
if op.type == 22:
if wait["leaveRoom"] == True:
ririn.leaveRoom(op.param1)
#-----------------Notif Leave Room-----------------#
if op.type == 24:
if wait["leaveRoom"] == True:
ririn.leaveRoom(op.param1)
#------------------Receive Message-----------------#
if op.type == 26:
msg = op.message
#------------------Receive Come Bye---------------#
if op.type == 26:
msg = op.message
if msg.toType == 0:
msg.to = msg._from
if msg._from == profile.mid:
if "join:" in msg.text:
list_ = msg.text.split(":")
try:
ririn.acceptGroupInvitationByTicket(list_[1],list_[2])
X = ririn.getGroup(list_[1])
X.preventJoinByTicket = True
ririn.updateGroup(X)
except:
ririn.sendText(msg.to,"ᴇʀʀᴏʀ")
if op.type == 1:
if wait["leaveRoom"] == True:
ririn.leaveRoom(msg.to)
#---------------------Blacklist User--------------------#
if op.type == 26:
msg = op.message
if msg.contentType == 13:
if wait["wblack"] == True:
if msg.contentMetadata["mid"] in wait["commentBlack"]:
ririn.sendText(msg.to,"ᴀʟʀᴇᴀᴅʏ")
wait["wblack"] = False
else:
wait["commentBlack"][msg.contentMetadata["mid"]] = True
wait["wblack"] = False
ririn.sendText(msg.to,"ᴅᴇᴄɪᴅᴇᴅ ɴᴏᴛ ᴛᴏ ᴄᴏᴍᴍᴇɴᴛ")
elif wait["dblack"] == True:
if msg.contentMetadata["mid"] in wait["commentBlack"]:
del wait["commentBlack"][msg.contentMetadata["mid"]]
ririn.sendText(msg.to,"ᴅᴇʟᴇᴛᴇᴅ")
wait["dblack"] = False
else:
wait["dblack"] = False
ririn.sendText(msg.to,"It is not in the black list")
elif wait["wblacklist"] == True:
if msg.contentMetadata["mid"] in wait["blacklist"]:
ririn.sendText(msg.to,"ᴀʟʀᴇᴀᴅʏ")
wait["wblacklist"] = False
else:
wait["blacklist"][msg.contentMetadata["mid"]] = True
wait["wblacklist"] = False
ririn.sendText(msg.to,"ᴀᴅᴅᴇᴅ")
elif wait["dblacklist"] == True:
if msg.contentMetadata["mid"] in wait["blacklist"]:
del wait["blacklist"][msg.contentMetadata["mid"]]
ririn.sendText(msg.to,"ᴅᴇʟᴇᴛᴇᴅ")
wait["dblacklist"] = False
else:
wait["dblacklist"] = False
ririn.sendText(msg.to,"ɪᴛ ɪs ɴᴏᴛ ɪɴ ᴛʜᴇ ʙʟᴀᴄᴋ ʟɪsᴛ")
#------------------------------------------=Contact=----------------------------------------#
elif wait["contact"] == True:
msg.contentType = 0
ririn.sendText(msg.to,msg.contentMetadata["mid"])
if 'displayName' in msg.contentMetadata:
contact = ririn.getContact(msg.contentMetadata["mid"])
try:
cu = ririn.channel.getCover(msg.contentMetadata["mid"])
except:
cu = ""
ririn.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 = ririn.getContact(msg.contentMetadata["mid"])
try:
cu = ririn.channel.getCover(msg.contentMetadata["mid"])
except:
cu = ""
ririn.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 = "post URL\n" + msg.contentMetadata["postEndUrl"]
else:
msg.text = "URL→\n" + msg.contentMetadata["postEndUrl"]
ririn.sendText(msg.to,msg.text)
elif msg.text is None:
return
#-------------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------=Keyword=----------------------------------------------------#
#-------------------------------------------------------------------------------------------------------------------------#
#------------------------Key Public----------------------#
elif msg.text in ["Key","key","help","Help"]:
if wait["lang"] == "JP":
ririn.sendText(msg.to,helpMessage)
ririn.sendContact(msg.to, "ueca4120a9d7b0e4a9e7f4f1b1b96a436")
else:
ririn.sendText(msg.to,helpt)
elif "Id" == msg.text:
ririn.sendText(msg.to,msg.to)
elif msg.text in ["Me"]:
ririn.sendContact(msg.to,msg._from)
elif msg.text in ["Mid ku","mid ku","My mid","Mid saya"]:
ririn.sendText(msg.to,msg._from)
elif msg.text == "Ginfo":
if msg.toType == 2:
ginfo = ririn.getGroup(msg.to)
try:
gCreator = ginfo.creator.displayName
except: