Commit ecbbd3c789e5634f8ad043d559ba5280a1d52e9b

Authored by Nadya Sutjiadi
Committed by GitHub
1 parent 86c486c4

Update Chucky.py

Showing 1 changed file with 1 additions and 4113 deletions
Chucky.py
1   -# -*- coding: utf-8 -*-
2   -#Chucky_Bot
3   -
4   -import LINETCR
5   -from LINETCR.lib.curve.ttypes import *
6   -from datetime import datetime
7   -from bs4 import BeautifulSoup
8   -from threading import Thread
9   -from googletrans import Translator
10   -from gtts import gTTS
11   -import time,random,sys,json,codecs,threading,glob,urllib,urllib2,urllib3,re,ast,os,subprocess,requests,tempfile
12   -
13   -cl = LINETCR.LINE()
14   -#cl.login(qr=True)
15   -cl.login(token='Token_Kamu_Di_Sini_Sayang')
16   -cl.loginResult()
17   -print "Cl-Login Success\n"
18   -
19   -ki = LINETCR.LINE()
20   -#ki.login(qr=True)
21   -ki.login(token='Token_Kamu_Di_Sini_Sayang')
22   -ki.loginResult()
23   -print "Ki-Login Success\n"
24   -
25   -kk = LINETCR.LINE()
26   -#kk.login(qr=True)
27   -kk.login(token='Token_Kamu_Di_Sini_Sayang')
28   -kk.loginResult()
29   -print "Kk-Login Success\n"
30   -
31   -kc = LINETCR.LINE()
32   -#kc.login(qr=True)
33   -kc.login(token='Token_Kamu_Di_Sini_Sayang')
34   -kc.loginResult()
35   -print "Kc-Login Success\n"
36   -
37   -kr = LINETCR.LINE()
38   -#kr.login(qr=True)
39   -kr.login(token='Token_Kamu_Di_Sini_Sayang')
40   -kr.loginResult()
41   -print "Kr-Login Success\n"
42   -
43   -km = LINETCR.LINE()
44   -#km.login(qr=True)
45   -km.login(token='Token_Kamu_Di_Sini_Sayang')
46   -km.loginResult()
47   -print "Km-Login Success\n\n=====[Sukses All Login]====="
48   -
49   -reload(sys)
50   -sys.setdefaultencoding('utf-8')
51   -
52   -
53   -selfMessage ="""
54   -╔═════════════════════════
55   -║ ☆☞ S E L F ☜☆
56   -╠═════════════════════════
57   -╠➩〘Hi〙
58   -╠➩〘Me〙
59   -╠➩〘Mymid〙
60   -╠➩〘Mid @〙
61   -╠➩〘SearchID: (ID LINE)〙
62   -╠➩〘Checkdate (DD/MM/YY)〙
63   -╠➩〘Kalender〙
64   -╠➩〘Steal contact〙
65   -╠➩〘Pp @〙
66   -╠➩〘Cover @〙
67   -╠➩〘Auto like〙
68   -╠➩〘Scbc Text〙
69   -╠➩〘Cbc Text〙
70   -╠➩〘Gbc Text〙
71   -╠➩〘Getbio @〙
72   -╠➩〘Getinfo @〙
73   -╠➩〘Getname @〙
74   -╠➩〘Getprofile @〙
75   -╠➩〘Getcontact @〙
76   -╠➩〘Getvid @〙
77   -╠➩〘Friendlist〙
78   -╠═════════════════════════
79   -║ 💠 By : Nadya 💠
80   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
81   -╚═════════════════════════
82   -"""
83   -
84   -botMessage ="""
85   -╔═════════════════════════
86   -║ ☆☞ B O T ☜☆
87   -╠═════════════════════════
88   -╠➩〘Absen〙
89   -╠➩〘Respon〙
90   -╠➩〘Runtime〙
91   -╠➩〘Kapten copy @〙
92   -╠➩〘TC1 copy @〙
93   -╠➩〘TC2 copy @〙
94   -╠➩〘TC3 copy @〙
95   -╠➩〘TC4 copy @〙
96   -╠➩〘Backup all〙
97   -╠➩〘/bio Text〙
98   -╠➩〘@bye (Usir Kapten)〙
99   -╠➩〘Bye all (Usir Semua)〙
100   -╠═════════════════════════
101   -║ 💠 By : Nadya 💠
102   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
103   -╚═════════════════════════
104   -"""
105   -
106   -mediaMessage ="""
107   -╔═════════════════════════
108   -║ ☆☞ M E D I A ☜☆
109   -╠═════════════════════════
110   -╠➩〘Gift〙
111   -╠➩〘Gift1 @ s/d Gift10 @〙
112   -╠➩〘Giftbycontact〙
113   -╠➩〘All gift〙
114   -╠➩〘Gif gore〙
115   -╠➩〘Google: (Text)〙
116   -╠➩〘Playstore NamaApp〙
117   -╠➩〘Fancytext: Text〙
118   -╠➩〘/musik Judul-Penyanyi〙
119   -╠➩〘/lirik Judul-Penyanyi〙
120   -╠➩〘/musrik Judul-Penyanyi〙
121   -╠➩〘/ig UrsnameInstagram〙
122   -╠➩〘Checkig UrsnameInstagram〙
123   -╠➩〘/apakah Text (Kerang Ajaib)〙
124   -╠➩〘/kapan Text (Kerang Ajaib)〙
125   -╠➩〘/hari Text (Kerang Ajaib)〙
126   -╠➩〘/berapa Text (Kerang Ajaib)〙
127   -╠➩〘/berapakah Text〙
128   -╠➩〘Youtubelink: Judul Video〙
129   -╠➩〘Youtubevideo: Judul Video〙
130   -╠➩〘Youtubesearch: Judul Video〙
131   -╠➩〘Image NamaGambar〙
132   -╠➩〘Say-id Text〙
133   -╠➩〘Say-en Text〙
134   -╠➩〘Say-jp Text〙
135   -╠➩〘Image NamaGambar〙
136   -╠➩〘Tr-id Text (Translate En Ke ID〙
137   -╠➩〘Tr-en Text (Translate ID Ke En〙
138   -╠➩〘Tr-th Text (Translate ID Ke Th〙
139   -╠➩〘Id@en Text (Translate ID Ke En〙
140   -╠➩〘Id@th Text (Translate ID Ke TH〙
141   -╠➩〘En@id Text (Translate En Ke ID〙
142   -╠═════════════════════════
143   -║ 💠 By : Nadya 💠
144   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
145   -╚═════════════════════════
146   -"""
147   -
148   -groupMessage ="""
149   -╔═════════════════════════
150   -║ ☆☞ G R O U P ☜☆
151   -╠═════════════════════════
152   -╠➩〘Welcome〙
153   -╠➩〘Say welcome〙
154   -╠➩〘Invite creator〙
155   -╠➩〘Setview〙
156   -╠➩〘Viewseen〙
157   -╠➩〘Gn: (NamaGroup)〙
158   -╠➩〘Tag all〙
159   -╠➩〘Recover〙
160   -╠➩〘Cancel〙
161   -╠➩〘Cancelall〙
162   -╠➩〘Gcreator〙
163   -╠➩〘Ginfo〙
164   -╠➩〘Gurl〙
165   -╠➩〘List group〙
166   -╠➩〘Pict group: (NamaGroup)〙
167   -╠➩〘Spam: (Text)〙
168   -╠➩〘Spam〙
169   -╠➩〘Add all〙
170   -╠➩〘Kick: (Mid)〙
171   -╠➩〘Invite: (Mid)〙
172   -╠➩〘Invite〙
173   -╠➩〘Memlist〙
174   -╠➩〘Getgroup image〙
175   -╠➩〘Urlgroup Image〙
176   -╠═════════════════════════
177   -║ 💠 By : Nadya 💠
178   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
179   -╚═════════════════════════
180   -"""
181   -tjia="u14f64e139a3817afaabe27d237afb36b"
182   -
183   -setMessage ="""
184   -╔═════════════════════════
185   -║ ☆☞ S E T ☜☆
186   -╠═════════════════════════
187   -╠➩〘Sambutan on/off〙
188   -╠➩〘Url on/off〙
189   -╠➩〘Alwaysread on/off〙
190   -╠➩〘Sider on/off〙
191   -╠➩〘Contact on/off〙
192   -╠➩〘Simisimi on/off〙
193   -╠═════════════════════════
194   -║ 💠 By : Nadya 💠
195   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
196   -╚═════════════════════════
197   -"""
198   -
199   -creatorMessage ="""
200   -╔═════════════════════════
201   -║ ☆☞ C R E A T O R ☜☆
202   -╠═════════════════════════
203   -╠➩〘Admin add @〙
204   -╠➩〘Admin remove @〙
205   -╠➩〘/cnkapten〙
206   -╠➩〘/cntc1〙
207   -╠➩〘/cntc2〙
208   -╠➩〘/cntc3〙
209   -╠➩〘/cntc4〙
210   -╠➩〘Crash〙
211   -╠➩〘Kickall〙
212   -╠➩〘Bc: (Text)〙
213   -╠➩〘Nk: @〙
214   -╠➩〘Ulti @〙
215   -╠➩〘Join group: (NamaGroup〙
216   -╠➩〘Leave group: (NamaGroup〙
217   -╠➩〘Leave all group〙
218   -╠➩〘Tag on/off〙
219   -╠➩〘Bot restart〙
220   -╠➩〘Turn off〙
221   -╠═════════════════════════
222   -║ 💠 By : Nadya 💠
223   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
224   -╚═════════════════════════
225   -"""
226   -
227   -adminMessage ="""
228   -╔═════════════════════════
229   -║ ☆☞ A D M I N ☜☆
230   -╠═════════════════════════
231   -╠➩〘Admin list〙
232   -╠➩〘Allprotect on/off〙
233   -╠➩〘Ban〙
234   -╠➩〘Unban〙
235   -╠➩〘Ban @〙
236   -╠➩〘Unban @〙
237   -╠➩〘Ban list〙
238   -╠➩〘Clear ban〙
239   -╠➩〘Kill〙
240   -╠➩〘Kick @〙
241   -╠➩〘Set member: (Jumblah)〙
242   -╠➩〘Ban group: (NamaGroup〙
243   -╠➩〘Del ban: (NamaGroup〙
244   -╠➩〘List ban〙
245   -╠➩〘Kill ban〙
246   -╠➩〘Glist〙
247   -╠➩〘Glistmid〙
248   -╠➩〘Details group: (Gid)〙
249   -╠➩〘Cancel invite: (Gid)〙
250   -╠➩〘Invitemeto: (Gid)〙
251   -╠➩〘Acc invite〙
252   -╠➩〘Removechat〙
253   -╠➩〘Qr on/off〙
254   -╠➩〘Autokick on/off〙
255   -╠➩〘Ghost on/off〙
256   -╠➩〘Autocancel on/off〙
257   -╠➩〘Invitepro on/off〙
258   -╠➩〘Join on/off〙
259   -╠➩〘Joincancel on/off〙
260   -╠➩〘Respon on/off〙
261   -╠➩〘Responkick on/off〙
262   -╠➩〘Leave on/off〙
263   -╠➩〘All join / (TC1/2/3/4 Join)〙
264   -╠═════════════════════════
265   -║ 💠 By : Nadya 💠
266   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
267   -╚═════════════════════════
268   -"""
269   -
270   -helpMessage ="""
271   -╔═════════════════════════
272   -║ ☆☞ H E L P ☜☆
273   -╠═════════════════════════
274   -╠➩〘Help self〙
275   -╠➩〘Help bot〙
276   -╠➩〘Help group〙
277   -╠➩〘Help set〙
278   -╠➩〘Help media〙
279   -╠➩〘Help admin〙
280   -╠➩〘Help creator〙
281   -╠➩〘Owner〙
282   -╠➩〘Pap owner〙
283   -╠➩〘Admin〙
284   -╠➩〘Speed〙
285   -╠➩〘Speed test〙
286   -╠➩〘Status〙
287   -╠═════════════════════════
288   -║ 💠 By : Nadya 💠
289   -║ 〽️ line.me/ti/p/~nad_nad. 〽️
290   -╚═════════════════════════
291   -"""
292   -
293   -
294   -KAC=[cl,ki,kk,kc,kr]
295   -mid = cl.getProfile().mid
296   -Amid = ki.getProfile().mid
297   -Bmid = kk.getProfile().mid
298   -Cmid = kc.getProfile().mid
299   -Dmid = kr.getProfile().mid
300   -Emid = km.getProfile().mid
301   -Bots=[mid,Amid,Bmid,Cmid,Dmid,Emid]
302   -Creator=["u14f64e139a3817afaabe27d237afb36b"]
303   -admin=["u14f64e139a3817afaabe27d237afb36b","u23ad5ddec0dd0523f9caffad673d693c","u8b2bb5214c1afc77d06901a535c23e30","u57a54b914085fea6f04c19f6fe589057","u94fb89525397a12a24df3642a7335fe7"]
304   -
305   -contact = cl.getProfile()
306   -backup1 = cl.getProfile()
307   -backup1.displayName = contact.displayName
308   -backup1.statusMessage = contact.statusMessage
309   -backup1.pictureStatus = contact.pictureStatus
310   -
311   -contact = ki.getProfile()
312   -backup2 = ki.getProfile()
313   -backup2.displayName = contact.displayName
314   -backup2.statusMessage = contact.statusMessage
315   -backup2.pictureStatus = contact.pictureStatus
316   -
317   -contact = kk.getProfile()
318   -backup3 = kk.getProfile()
319   -backup3.displayName = contact.displayName
320   -backup3.statusMessage = contact.statusMessage
321   -backup3.pictureStatus = contact.pictureStatus
322   -
323   -contact = kc.getProfile()
324   -backup4 = kc.getProfile()
325   -backup4.displayName = contact.displayName
326   -backup4.statusMessage = contact.statusMessage
327   -backup4.pictureStatus = contact.pictureStatus
328   -
329   -contact = kr.getProfile()
330   -backup5 = kr.getProfile()
331   -backup5.displayName = contact.displayName
332   -backup5.statusMessage = contact.statusMessage
333   -backup5.pictureStatus = contact.pictureStatus
334   -
335   -responsename = cl.getProfile().displayName
336   -responsename2 = ki.getProfile().displayName
337   -responsename3 = kk.getProfile().displayName
338   -responsename4 = kc.getProfile().displayName
339   -responsename5 = kr.getProfile().displayName
340   -
341   -
342   -wait = {
343   - "LeaveRoom":True,
344   - "AutoJoin":False,
345   - "AutoJoinCancel":True,
346   - "memberscancel":30,
347   - "Members":1,
348   - "AutoCancel":False,
349   - "AutoKick":True,
350   - 'pap':{},
351   - 'invite':{},
352   - 'steal':{},
353   - 'gift':{},
354   - 'likeOn':{},
355   - 'Leave':{},
356   - 'detectMention':True,
357   - 'kickMention':False,
358   - 'timeline':True,
359   - "Timeline":True,
360   - "comment1":"Kenapa Kak?",
361   - "comment2":"Wkwkwk \(○^ω^○)/",
362   - "comment3":"Lucu Banget!!! ヘ(^_^)ヘ",
363   - "comment4":"Nice Kak (^_^)",
364   - "comment5":"Bot Auto Like ©By : Nadya\nContact Me : 👉 line.me/ti/p/~nad_nad.",
365   - "commentOn":True,
366   - "commentBlack":{},
367   - "message":"Thx For Add Me (^_^)\nInvite Me To Your Group ヘ(^_^)ヘ",
368   - "blacklist":{},
369   - "wblacklist":False,
370   - "dblacklist":False,
371   - "Qr":False,
372   - "Contact":False,
373   - "Sambutan":True,
374   - "Ghost":False,
375   - "inviteprotect":False,
376   - "alwaysRead":False,
377   - "Tag":True,
378   - "Sider":{},
379   - "Simi":{},
380   - "lang":"JP",
381   - "BlGroup":{}
382   -}
383   -
384   -settings = {
385   - "simiSimi":{}
386   - }
387   -
388   -cctv = {
389   - "cyduk":{},
390   - "point":{},
391   - "sidermem":{}
392   -}
393   -
394   -wait2 = {
395   - "readPoint":{},
396   - "readMember":{},
397   - "setTime":{},
398   - "ROM":{}
399   - }
400   -
401   -setTime = {}
402   -setTime = wait2['setTime']
403   -mulai = time.time()
404   -
405   -def download_page(url):
406   - version = (3,0)
407   - cur_version = sys.version_info
408   - if cur_version >= version:
409   - import urllib,request
410   - try:
411   - headers = {}
412   - headers['User-Agent'] = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
413   - req = urllib,request.Request(url, headers = headers)
414   - resp = urllib,request.urlopen(req)
415   - respData = str(resp.read())
416   - return respData
417   - except Exception as e:
418   - print(str(e))
419   - else:
420   - import urllib2
421   - try:
422   - headers = {}
423   - headers['User-Agent'] = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17"
424   - req = urllib2.Request(url, headers = headers)
425   - response = urllib2.urlopen(req)
426   - page = response.read()
427   - return page
428   - except:
429   - return"Page Not found"
430   -
431   -
432   -def _images_get_next_item(s):
433   - start_line = s.find('rg_di')
434   - if start_line == -1:
435   - end_quote = 0
436   - link = "no_links"
437   - return link, end_quote
438   - else:
439   - start_line = s.find('"class="rg_meta"')
440   - start_content = s.find('"ou"',start_line+90)
441   - end_content = s.find(',"ow"',start_content-90)
442   - content_raw = str(s[start_content+6:end_content-1])
443   - return content_raw, end_content
444   -
445   -
446   -def _images_get_all_items(page):
447   - items = []
448   - while True:
449   - item, end_content = _images_get_next_item(page)
450   - if item == "no_links":
451   - break
452   - else:
453   - items.append(item)
454   - time.sleep(0.1)
455   - page = page[end_content:]
456   - return items
457   -
458   -def waktu(secs):
459   - mins, secs = divmod(secs,60)
460   - hours, mins = divmod(mins,60)
461   - return '%02d Jam %02d Menit %02d Detik' % (hours, mins, secs)
462   -
463   -def cms(string, commands): #/XXX, >XXX, ;XXX, ^XXX, %XXX, $XXX...
464   - tex = ["+","@","/",">",";","^","%","$","^","サテラ:","サテラ:","サテラ:","サテラ:"]
465   - for texX in tex:
466   - for command in commands:
467   - if string ==command:
468   - return True
469   - return False
470   -
471   -def upload_tempimage(client):
472   - '''
473   - Upload a picture of a kitten. We don't ship one, so get creative!
474   - '''
475   - config = {
476   - 'album': album,
477   - 'name': 'bot auto upload',
478   - 'title': 'bot auto upload',
479   - 'description': 'bot auto upload'
480   - }
481   -
482   - print("Uploading image... ")
483   - image = client.upload_from_path(image_path, config=config, anon=False)
484   - print("Done")
485   - print()
486   -
487   - return image
488   -
489   -def sendAudio(self, to_, path):
490   - M = Message()
491   - M.text = None
492   - M.to = to_
493   - M.contentMetadata = None
494   - M.contentPreview = None
495   - M.contentType = 3
496   - M_id = self._client.sendMessage(0,M).id
497   - files = {
498   - 'file': open(path, 'rb'),
499   - }
500   -
501   -def sendMessage(to, text, contentMetadata={}, contentType=0):
502   - mes = Message()
503   - mes.to, mes.from_ = to, profile.mid
504   - mes.text = text
505   - mes.contentType, mes.contentMetadata = contentType, contentMetadata
506   - if to not in messageReq:
507   - messageReq[to] = -1
508   - messageReq[to] += 1
509   -
510   -def sendImage(self, to_, path):
511   - M = Message(to=to_, text=None, contentType = 1)
512   - M.contentMetadata = None
513   - M.contentPreview = None
514   - M2 = self._client.sendMessage(0,M)
515   - M_id = M2.id
516   - files = {
517   - 'file': open(path, 'rb'),
518   - }
519   - params = {
520   - 'name': 'media',
521   - 'oid': M_id,
522   - 'size': len(open(path, 'rb').read()),
523   - 'type': 'image',
524   - 'ver': '1.0',
525   - }
526   - data = {
527   - 'params': json.dumps(params)
528   - }
529   - r = self.post_content('https://obs-sg.line-apps.com/talk/m/upload.nhn', data=data, files=files)
530   - if r.status_code != 201:
531   - raise Exception('Upload image failure.')
532   - return True
533   -
534   -
535   -def sendImageWithURL(self, to_, url):
536   - path = '%s/pythonLine-%i.data' % (tempfile.gettempdir(), randint(0, 9))
537   - r = requests.get(url, stream=True)
538   - if r.status_code == 200:
539   - with open(path, 'w') as f:
540   - shutil.copyfileobj(r.raw, f)
541   - else:
542   - raise Exception('Download image failure.')
543   - try:
544   - self.sendImage(to_, path)
545   - except:
546   - try:
547   - self.sendImage(to_, path)
548   - except Exception as e:
549   - raise e
550   -
551   -def sendAudio(self, to_, path):
552   - M = Message()
553   - M.text = None
554   - M.to = to_
555   - M.contentMetadata = None
556   - M.contentPreview = None
557   - M.contentType = 3
558   - M_id = self._client.sendMessage(0,M).id
559   - files = {
560   - 'file': open(path, 'rb'),
561   - }
562   - params = {
563   - 'name': 'media',
564   - 'oid': M_id,
565   - 'size': len(open(path, 'rb').read()),
566   - 'type': 'audio',
567   - 'ver': '1.0',
568   - }
569   - data = {
570   - 'params': json.dumps(params)
571   - }
572   - r = self.post_content('https://os.line.naver.jp/talk/m/upload.nhn', data=data, files=files)
573   - if r.status_code != 201:
574   - raise Exception('Upload audio failure.')
575   - return True
576   -
577   -def sendAudioWithURL(self, to_, url):
578   - path = self.downloadFileWithURL(url)
579   - try:
580   - self.sendAudio(to_, path)
581   - except Exception as e:
582   - raise Exception(e)
583   -
584   -def sendAudioWithUrl(self, to_, url):
585   - path = '%s/pythonLine-%1.data' % (tempfile.gettempdir(), randint(0, 9))
586   - r = requests.get(url, stream=True, verify=False)
587   - if r.status_code == 200:
588   - with open(path, 'w') as f:
589   - shutil.copyfileobj(r.raw, f)
590   - else:
591   - raise Exception('Download audio failure.')
592   - try:
593   - self.sendAudio(to_, path)
594   - except Exception as e:
595   - raise e
596   -
597   -def downloadFileWithURL(self, fileUrl):
598   - saveAs = '%s/pythonLine-%i.data' % (tempfile.gettempdir(), randint(0, 9))
599   - r = self.get_content(fileUrl)
600   - if r.status_code == 200:
601   - with open(saveAs, 'wb') as f:
602   - shutil.copyfileobj(r.raw, f)
603   - return saveAs
604   - else:
605   - raise Exception('Download file failure.')
606   -
607   -def restart_program():
608   - python = sys.executable
609   - os.execl(python, python, * sys.argv)
610   -
611   -
612   -def bot(op):
613   - try:
614   -
615   - if op.type == 0:
616   - return
617   -
618   - if op.type == 5:
619   - if wait["autoAdd"] == True:
620   - cl.findAndAddContactsByMid(op.param1)
621   - if(wait["message"]in[""," ","\n",None]):
622   - pass
623   - else:
624   - cl.sendText(op.param1,str(wait["message"]))
625   -
626   -
627   - if op.type == 55:
628   - try:
629   - group_id = op.param1
630   - user_id=op.param2
631   - subprocess.Popen('echo "'+ user_id+'|'+str(op.createdTime)+'" >> dataSeen/%s.txt' % group_id, shell=True, stdout=subprocess.PIPE, )
632   - except Exception as e:
633   - print e
634   -
635   - if op.type == 55:
636   - try:
637   - if cctv['cyduk'][op.param1]==True:
638   - if op.param1 in cctv['point']:
639   - Name = cl.getContact(op.param2).displayName
640   - if Name in cctv['sidermem'][op.param1]:
641   - pass
642   - else:
643   - cctv['sidermem'][op.param1] += "\n• " + Name
644   - if " " in Name:
645   - nick = Name.split(' ')
646   - if len(nick) == 2:
647   - cl.sendText(op.param1, "Haii " + "☞ " + nick[0] + " ☜" + "\nNgintip Aja Niih. . .\nChat Kek Idiih (-__-) ")
648   - else:
649   - cl.sendText(op.param1, "Haii " + "☞ " + nick[1] + " ☜" + "\nBetah Banget Jadi Penonton. . .\nChat Napa (-__-) ")
650   - else:
651   - cl.sendText(op.param1, "Haii " + "☞ " + Name + " ☜" + "\nNgapain Kak Ngintip Aja???\nSini Gabung Chat... ")
652   - else:
653   - pass
654   - else:
655   - pass
656   - except:
657   - pass
658   -
659   - else:
660   - pass
661   -
662   -
663   - if op.type == 22:
664   - cl.leaveRoom(op.param1)
665   -
666   - if op.type == 21:
667   - cl.leaveRoom(op.param1)
668   -
669   -
670   - if op.type == 13:
671   - print op.param3
672   - if op.param3 in mid:
673   - if op.param2 in Creator:
674   - cl.acceptGroupInvitation(op.param1)
675   - if op.param3 in Amid:
676   - if op.param2 in Creator:
677   - ki.acceptGroupInvitation(op.param1)
678   - if op.param3 in Bmid:
679   - if op.param2 in Creator:
680   - kk.acceptGroupInvitation(op.param1)
681   - if op.param3 in Cmid:
682   - if op.param2 in Creator:
683   - kc.acceptGroupInvitation(op.param1)
684   - if op.param3 in Dmid:
685   - if op.param2 in Creator:
686   - kr.acceptGroupInvitation(op.param1)
687   -
688   - if op.param3 in mid:
689   - if op.param2 in Amid:
690   - cl.acceptGroupInvitation(op.param1)
691   - if op.param3 in mid:
692   - if op.param2 in Bmid:
693   - cl.acceptGroupInvitation(op.param1)
694   - if op.param3 in mid:
695   - if op.param2 in Cmid:
696   - cl.acceptGroupInvitation(op.param1)
697   -
698   - if op.param3 in Amid:
699   - if op.param2 in mid:
700   - ki.acceptGroupInvitation(op.param1)
701   - if op.param3 in Amid:
702   - if op.param2 in Bmid:
703   - ki.acceptGroupInvitation(op.param1)
704   - if op.param3 in Amid:
705   - if op.param2 in Cmid:
706   - ki.acceptGroupInvitation(op.param1)
707   -
708   - if op.param3 in Bmid:
709   - if op.param2 in mid:
710   - kk.acceptGroupInvitation(op.param1)
711   - if op.param3 in Bmid:
712   - if op.param2 in Amid:
713   - kk.acceptGroupInvitation(op.param1)
714   - if op.param3 in Bmid:
715   - if op.param2 in Cmid:
716   - kk.acceptGroupInvitation(op.param1)
717   -
718   - if op.param3 in Cmid:
719   - if op.param2 in mid:
720   - kc.acceptGroupInvitation(op.param1)
721   - if op.param3 in Cmid:
722   - if op.param2 in Amid:
723   - kc.acceptGroupInvitation(op.param1)
724   - if op.param3 in Cmid:
725   - if op.param2 in Cmid:
726   - kc.acceptGroupInvitation(op.param1)
727   -
728   - if op.param3 in Dmid:
729   - if op.param2 in mid:
730   - kr.acceptGroupInvitation(op.param1)
731   - if op.param3 in Dmid:
732   - if op.param2 in Amid:
733   - kr.acceptGroupInvitation(op.param1)
734   - if op.param3 in Dmid:
735   - if op.param2 in Bmid:
736   - kr.acceptGroupInvitation(op.param1)
737   -
738   - if mid in op.param3:
739   - if wait["AutoJoin"] == True:
740   - G = cl.getGroup(op.param1)
741   - if len(G.members) <= wait["Members"]:
742   - cl.rejectGroupInvitation(op.param1)
743   - else:
744   - cl.acceptGroupInvitation(op.param1)
745   - G = cl.getGroup(op.param1)
746   - G.preventJoinByTicket = False
747   - cl.updateGroup(G)
748   - Ti = cl.reissueGroupTicket(op.param1)
749   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
750   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
751   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
752   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
753   - G.preventJoinByTicket = True
754   - cl.updateGroup(G)
755   - cl.sendText(op.param1,"☆Ketik ☞Help☜ Untuk Bantuan☆\n☆Harap Gunakan Dengan Bijak ^_^ ☆")
756   - else:
757   - if wait["AutoCancel"] == True:
758   - if op.param3 in Bots:
759   - pass
760   - else:
761   - cl.cancelGroupInvitation(op.param1, [op.param3])
762   - else:
763   - if op.param3 in wait["blacklist"]:
764   - cl.cancelGroupInvitation(op.param1, [op.param3])
765   - cl.sendText(op.param1, "Blacklist Detected")
766   - else:
767   - pass
768   -
769   - if op.type == 13:
770   - if op.param2 not in Creator:
771   - if op.param2 not in admin:
772   - if op.param2 not in Bots:
773   - if op.param2 in Creator:
774   - if op.param2 in admin:
775   - if op.param2 in Bots:
776   - pass
777   - elif wait["inviteprotect"] == True:
778   - wait ["blacklist"][op.param2] = True
779   - cl.cancelGroupInvitation(op.param1,[op.param3])
780   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
781   - if op.param2 not in Creator:
782   - if op.param2 not in admin:
783   - if op.param2 not in Bots:
784   - if op.param2 in Creator:
785   - if op.param2 in admin:
786   - if op.param2 in Bots:
787   - pass
788   -
789   -
790   -
791   - if op.type == 13:
792   - if wait["AutoJoinCancel"] == True:
793   - G = cl.getGroup(op.param1)
794   - if len(G.members) <= wait["memberscancel"]:
795   - cl.acceptGroupInvitation(op.param1)
796   - cl.sendText(op.param1,"Maaf " + cl.getContact(op.param2).displayName + "\nMember Kurang Dari 30 Orang\nUntuk Info, Silahkan Chat Owner Kami!")
797   - cl.leaveGroup(op.param1)
798   - else:
799   - cl.acceptGroupInvitation(op.param1)
800   - G = cl.getGroup(op.param1)
801   - G.preventJoinByTicket = False
802   - cl.updateGroup(G)
803   - Ti = cl.reissueGroupTicket(op.param1)
804   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
805   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
806   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
807   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
808   - G.preventJoinByTicket = True
809   - cl.updateGroup(G)
810   - cl.sendText(op.param1,"☆Ketik ☞Help☜ Untuk Bantuan☆\n☆Harap Gunakan Dengan Bijak ^_^ ☆")
811   -
812   -
813   -
814   -
815   - if op.type == 19:
816   - if wait["AutoKick"] == True:
817   - try:
818   - if op.param3 in Creator:
819   - if op.param3 in admin:
820   - if op.param3 in Bots:
821   - pass
822   - if op.param2 in Creator:
823   - if op.param2 in admin:
824   - if op.param2 in Bots:
825   - pass
826   - else:
827   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
828   - if op.param2 in wait["blacklist"]:
829   - pass
830   - else:
831   - random.choice(KAC).inviteIntoGroup(op.param1,[op.param3])
832   - except:
833   - try:
834   - if op.param2 not in Creator:
835   - if op.param2 not in admin:
836   - if op.param2 not in Bots:
837   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
838   - if op.param2 in wait["blacklist"]:
839   - pass
840   - else:
841   - random.choice(KAC).inviteIntoGroup(op.param1,[op.param3])
842   - except:
843   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
844   - if op.param2 in wait["blacklist"]:
845   - pass
846   - else:
847   - if op.param2 in Creator:
848   - if op.param2 in admin:
849   - if op.param2 in Bots:
850   - pass
851   - else:
852   - wait["blacklist"][op.param2] = True
853   - if op.param2 in wait["blacklist"]:
854   - pass
855   - else:
856   - if op.param2 in Creator:
857   - if op.param2 in admin:
858   - if op.param2 in Bots:
859   - pass
860   - else:
861   - wait["blacklist"][op.param2] = True
862   - else:
863   - pass
864   -
865   -
866   - if mid in op.param3:
867   - if op.param2 in Creator:
868   - if op.param2 in Bots:
869   - pass
870   - try:
871   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
872   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
873   - except:
874   - try:
875   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
876   - except:
877   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
878   - if op.param2 in wait["blacklist"]:
879   - pass
880   - else:
881   - if op.param2 in Bots:
882   - pass
883   - else:
884   - wait["blacklist"][op.param2] = True
885   - G = ki.getGroup(op.param1)
886   - G.preventJoinByTicket = False
887   - ki.updateGroup(G)
888   - Ti = ki.reissueGroupTicket(op.param1)
889   - cl.acceptGroupInvitationByTicket(op.param1,Ti)
890   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
891   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
892   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
893   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
894   - X = cl.getGroup(op.param1)
895   - X.preventJoinByTicket = True
896   - cl.updateGroup(X)
897   - if op.param2 in wait["blacklist"]:
898   - pass
899   - else:
900   - if op.param2 in Bots:
901   - pass
902   - else:
903   - wait["blacklist"][op.param2] = True
904   -
905   - if Amid in op.param3:
906   - if op.param2 in Bots:
907   - pass
908   - try:
909   - kk.kickoutFromGroup(op.param1,[op.param2])
910   - kc.kickoutFromGroup(op.param1,[op.param2])
911   - except:
912   - try:
913   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
914   - except:
915   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
916   - if op.param2 in wait["blacklist"]:
917   - pass
918   - else:
919   - if op.param2 in Bots:
920   - pass
921   - else:
922   - wait["blacklist"][op.param2] = True
923   -
924   - X = kk.getGroup(op.param1)
925   - X.preventJoinByTicket = False
926   - cl.updateGroup(X)
927   - Ti = kk.reissueGroupTicket(op.param1)
928   - cl.acceptGroupInvitationByTicket(op.param1,Ti)
929   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
930   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
931   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
932   - G = ki.getGroup(op.param1)
933   - G.preventJoinByTicket = True
934   - ki.updateGroup(G)
935   - if op.param2 in wait["blacklist"]:
936   - pass
937   - else:
938   - if op.param2 in Bots:
939   - pass
940   - else:
941   - wait["blacklist"][op.param2] = True
942   -
943   - if Bmid in op.param3:
944   - if op.param2 in Bots:
945   - pass
946   - try:
947   - kc.kickoutFromGroup(op.param1,[op.param2])
948   - kk.kickoutFromGroup(op.param1,[op.param2])
949   - except:
950   - try:
951   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
952   - except:
953   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
954   - if op.param2 in wait["blacklist"]:
955   - pass
956   - else:
957   - if op.param2 in Bots:
958   - pass
959   - else:
960   - wait["blacklist"][op.param2] = True
961   -
962   - X = kc.getGroup(op.param1)
963   - X.preventJoinByTicket = False
964   - kc.updateGroup(X)
965   - Ti = kc.reissueGroupTicket(op.param1)
966   - cl.acceptGroupInvitationByTicket(op.param1,Ti)
967   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
968   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
969   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
970   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
971   - G = kk.getGroup(op.param1)
972   - G.preventJoinByTicket = True
973   - kk.updateGroup(G)
974   - if op.param2 in wait["blacklist"]:
975   - pass
976   - else:
977   - if op.param2 in Bots:
978   - pass
979   - else:
980   - wait["blacklist"][op.param2] = True
981   -
982   - if Cmid in op.param3:
983   - if op.param2 in Bots:
984   - pass
985   - try:
986   - cl.kickoutFromGroup(op.param1,[op.param2])
987   - kk.kickoutFromGroup(op.param1,[op.param2])
988   - except:
989   - try:
990   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
991   - except:
992   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
993   - if op.param2 in wait["blacklist"]:
994   - pass
995   - else:
996   - if op.param2 in Bots:
997   - pass
998   - else:
999   - wait["blacklist"][op.param2] = True
1000   -
1001   - X = cl.getGroup(op.param1)
1002   - X.preventJoinByTicket = False
1003   - cl.updateGroup(X)
1004   - Ti = cl.reissueGroupTicket(op.param1)
1005   - cl.acceptGroupInvitationByTicket(op.param1,Ti)
1006   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
1007   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
1008   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
1009   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
1010   - G = kc.getGroup(op.param1)
1011   - G.preventJoinByTicket = True
1012   - kc.updateGroup(G)
1013   - if op.param2 in wait["blacklist"]:
1014   - pass
1015   - else:
1016   - if op.param2 in Bots:
1017   - pass
1018   - else:
1019   - wait["blacklist"][op.param2] = True
1020   -
1021   - if Dmid in op.param3:
1022   - if op.param2 in Bots:
1023   - pass
1024   - try:
1025   - cl.kickoutFromGroup(op.param1,[op.param2])
1026   - kk.kickoutFromGroup(op.param1,[op.param2])
1027   - except:
1028   - try:
1029   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
1030   - except:
1031   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
1032   - if op.param2 in wait["blacklist"]:
1033   - pass
1034   - else:
1035   - if op.param2 in Bots:
1036   - pass
1037   - else:
1038   - wait["blacklist"][op.param2] = True
1039   -
1040   - X = cl.getGroup(op.param1)
1041   - X.preventJoinByTicket = False
1042   - cl.updateGroup(X)
1043   - Ti = cl.reissueGroupTicket(op.param1)
1044   - cl.acceptGroupInvitationByTicket(op.param1,Ti)
1045   - ki.acceptGroupInvitationByTicket(op.param1,Ti)
1046   - kk.acceptGroupInvitationByTicket(op.param1,Ti)
1047   - kc.acceptGroupInvitationByTicket(op.param1,Ti)
1048   - kr.acceptGroupInvitationByTicket(op.param1,Ti)
1049   - G = kc.getGroup(op.param1)
1050   - G.preventJoinByTicket = True
1051   - kc.updateGroup(G)
1052   - if op.param2 in wait["blacklist"]:
1053   - pass
1054   - else:
1055   - if op.param2 in Bots:
1056   - pass
1057   - else:
1058   - wait["blacklist"][op.param2] = True
1059   -
1060   - if Creator in op.param3:
1061   - if admin in op.param3:
1062   - if op.param2 in Bots:
1063   - pass
1064   - try:
1065   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
1066   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
1067   - except:
1068   - try:
1069   - if op.param2 not in Bots:
1070   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
1071   - if op.param2 in wait["blacklist"]:
1072   - pass
1073   - else:
1074   - random.choice(KAC).inviteIntoGroup(op.param1,[op.param3])
1075   - except:
1076   - print ("client Kick regulation or Because it does not exist in the group\ngid=["+op.param1+"]\nmid=["+op.param2+"]")
1077   - if op.param2 in wait["blacklist"]:
1078   - pass
1079   - if op.param2 in wait["whitelist"]:
1080   - pass
1081   - else:
1082   - wait["blacklist"][op.param2] = True
1083   - random.choice(KAC).inviteIntoGroup(op.param1,[op.param3])
1084   - if op.param2 in wait["blacklist"]:
1085   - pass
1086   - if op.param2 in wait["whitelist"]:
1087   - pass
1088   - else:
1089   - wait["blacklist"][op.param2] = True
1090   -
1091   -
1092   - if op.type == 11:
1093   - if wait["Qr"] == True:
1094   - if op.param2 in Creator:
1095   - if op.param2 in admin:
1096   - if op.param2 in Bots:
1097   - pass
1098   - else:
1099   - random.choice(KAC).kickoutFromGroup(op.param1,[op.param2])
1100   - else:
1101   - pass
1102   -
1103   -
1104   - if op.type == 17:
1105   - if wait["Sambutan"] == True:
1106   - if op.param2 in admin:
1107   - return
1108   - ginfo = cl.getGroup(op.param1)
1109   - contact = cl.getContact(op.param2)
1110   - image = "http://dl.profile.line-cdn.net/" + contact.pictureStatus
1111   - cl.sendText(op.param1,"Hallo " + cl.getContact(op.param2).displayName + "\nWelcome To ☞ " + str(ginfo.name) + " ☜" + "\nBudayakan Cek Note\nDan Semoga Betah Disini ^_^")
1112   - cl.sendImageWithURL(op.param1,image)
1113   - print "MEMBER JOIN TO GROUP"
1114   -
1115   - if op.type == 15:
1116   - if wait["Sambutan"] == True:
1117   - if op.param2 in admin:
1118   - return
1119   - cl.sendText(op.param1,"Good Bye " + cl.getContact(op.param2).displayName + "\nSee You Next Time . . . (p′︵‵。) 🤗")
1120   - random.choice(KAC).inviteIntoGroup(op.param1,[op.param2])
1121   - print "MEMBER HAS LEFT THE GROUP"
1122   -
1123   - if op.type == 19:
1124   - if wait["Ghost"] == True:
1125   - if op.param2 in Creator:
1126   - if op.param2 in admin:
1127   - if op.param2 in Bots:
1128   - pass
1129   - else:
1130   - try:
1131   - G = cl.getGroup(op.param1)
1132   - G.preventJoinByTicket = False
1133   - cl.updateGroup(G)
1134   - Ticket = cl.reissueGroupTicket(op.param1)
1135   - km.acceptGroupInvitationByTicket(op.param1,Ticket)
1136   - time.sleep(0.01)
1137   - km.kickoutFromGroup(op.param1,[op.param2])
1138   - c = Message(to=op.param1, from_=None, text=None, contentType=13)
1139   - c.contentMetadata={'mid':op.param2}
1140   - km.sendMessage(c)
1141   - km.leaveGroup(op.param1)
1142   - G.preventJoinByTicket = True
1143   - cl.updateGroup(G)
1144   - wait["blacklist"][op.param2] = True
1145   - except:
1146   - G = cl.getGroup(op.param1)
1147   - G.preventJoinByTicket = False
1148   - cl.updateGroup(G)
1149   - Ticket = cl.reissueGroupTicket(op.param1)
1150   - km.acceptGroupInvitationByTicket(op.param1,Ticket)
1151   - time.sleep(0.01)
1152   - km.kickoutFromGroup(op.param1,[op.param2])
1153   - c = Message(to=op.param1, from_=None, text=None, contentType=13)
1154   - c.contentMetadata={'mid':op.param2}
1155   - km.sendMessage(c)
1156   - km.leaveGroup(op.param1)
1157   - G.preventJoinByTicket = True
1158   - cl.updateGroup(G)
1159   - wait["blacklist"][op.param2] = True
1160   -
1161   -
1162   - if op.type == 26:
1163   - msg = op.message
1164   -
1165   -
1166   -
1167   - if wait["alwaysRead"] == True:
1168   - if msg.toType == 0:
1169   - cl.sendChatChecked(msg.from_,msg.id)
1170   - else:
1171   - cl.sendChatChecked(msg.to,msg.id)
1172   -
1173   - if msg.contentType == 16:
1174   - if wait['likeOn'] == True:
1175   - url = msg.contentMetadata["postEndUrl"]
1176   - cl.like(url[25:58], url[66:], likeType=1005)
1177   - ki.like(url[25:58], url[66:], likeType=1002)
1178   - kk.like(url[25:58], url[66:], likeType=1004)
1179   - kc.like(url[25:58], url[66:], likeType=1003)
1180   - kr.like(url[25:58], url[66:], likeType=1001)
1181   - cl.comment(url[25:58], url[66:], wait["comment1"])
1182   - ki.comment(url[25:58], url[66:], wait["comment2"])
1183   - kk.comment(url[25:58], url[66:], wait["comment3"])
1184   - kc.comment(url[25:58], url[66:], wait["comment4"])
1185   - kr.comment(url[25:58], url[66:], wait["comment5"])
1186   - cl.sendText(msg.to,"Like Success")
1187   - wait['likeOn'] = False
1188   -
1189   - if op.type == 26:
1190   - msg = op.message
1191   - if msg.to in settings["simiSimi"]:
1192   - if settings["simiSimi"][msg.to] == True:
1193   - if msg.text is not None:
1194   - text = msg.text
1195   - r = requests.get("http://api.ntcorp.us/chatbot/v1/?text=" + text.replace(" ","+") + "&key=beta1.nt")
1196   - data = r.text
1197   - data = json.loads(data)
1198   - if data['status'] == 200:
1199   - if data['result']['result'] == 100:
1200   - cl.sendText(msg.to,data['result']['response'].encode('utf-8'))
1201   -
1202   - if 'MENTION' in msg.contentMetadata.keys() != None:
1203   - if wait["kickMention"] == True:
1204   - contact = cl.getContact(msg.from_)
1205   - cName = contact.displayName
1206   - balas = ["Aku Bilang Jangan Ngetag Lagi " + cName + "\nAku Kick Kamu! Sorry, Byee!!!"]
1207   - ret_ = random.choice(balas)
1208   - name = re.findall(r'@(\w+)', msg.text)
1209   - mention = ast.literal_eval(msg.contentMetadata['MENTION'])
1210   - mentionees = mention['MENTIONEES']
1211   - for mention in mentionees:
1212   - if mention['M'] in Creator:
1213   - cl.sendText(msg.to,ret_)
1214   - random.choice(KAC).kickoutFromGroup(msg.to,[msg.from_])
1215   - break
1216   - if mention['M'] in admin:
1217   - cl.sendText(msg.to,ret_)
1218   - random.choice(KAC).kickoutFromGroup(msg.to,[msg.from_])
1219   - break
1220   - if mention['M'] in Bots:
1221   - cl.sendText(msg.to,ret_)
1222   - random.choice(KAC).kickoutFromGroup(msg.to,[msg.from_])
1223   - break
1224   -
1225   - if 'MENTION' in msg.contentMetadata.keys() != None:
1226   - if wait["detectMention"] == True:
1227   - contact = cl.getContact(msg.from_)
1228   - cName = contact.displayName
1229   - balas = ["Dont Tag!! Lagi Sibuk",cName + " Ngapain Ngetag?",cName + " Nggak Usah Tag-Tag! Kalo Penting Langsung Pc Aja","-_-","Dia Lagi Off", cName + " Kenapa Tag Saya?","Dia Lagi Tidur\nJangan Di Tag " + cName, "Jangan Suka Tag Gua " + cName, "Kamu Siapa " + cName + "?", "Ada Perlu Apa " + cName + "?","Woii " + cName + " Jangan Ngetag, Riibut!"]
1230   - ret_ = random.choice(balas)
1231   - name = re.findall(r'@(\w+)', msg.text)
1232   - mention = ast.literal_eval(msg.contentMetadata['MENTION'])
1233   - mentionees = mention['MENTIONEES']
1234   - for mention in mentionees:
1235   - if mention['M'] in Creator:
1236   - cl.sendText(msg.to,ret_)
1237   - break
1238   - if mention['M'] in admin:
1239   - cl.sendText(msg.to,ret_)
1240   - break
1241   - if mention['M'] in Bots:
1242   - cl.sendText(msg.to,ret_)
1243   - break
1244   -
1245   -
1246   - if msg.contentType == 13:
1247   - if wait["wblacklist"] == True:
1248   - if msg.contentMetadata["mid"] not in admin:
1249   - if msg.contentMetadata["mid"] in wait["blacklist"]:
1250   - random.choice(KAC).sendText(msg.to,"Sudah")
1251   - wait["wblacklist"] = False
1252   - else:
1253   - wait["blacklist"][msg.contentMetadata["mid"]] = True
1254   - wait["wblacklist"] = False
1255   - random.choice(KAC).sendText(msg.to,"Ditambahkan")
1256   - else:
1257   - cl.sendText(msg.to,"Admin Detected~")
1258   -
1259   -
1260   - elif wait["dblacklist"] == True:
1261   - if msg.contentMetadata["mid"] in wait["blacklist"]:
1262   - del wait["blacklist"][msg.contentMetadata["mid"]]
1263   - random.choice(KAC).sendText(msg.to,"Terhapus")
1264   - wait["dblacklist"] = False
1265   -
1266   - else:
1267   - wait["dblacklist"] = False
1268   - random.choice(KAC).sendText(msg.to,"Tidak Ada Black List")
1269   -
1270   -
1271   -
1272   - elif wait["Contact"] == True:
1273   - msg.contentType = 0
1274   - cl.sendText(msg.to,msg.contentMetadata["mid"])
1275   - if 'displayName' in msg.contentMetadata:
1276   - contact = cl.getContact(msg.contentMetadata["mid"])
1277   - try:
1278   - cu = cl.channel.getCover(msg.contentMetadata["mid"])
1279   - except:
1280   - cu = ""
1281   - cl.sendText(msg.to,"Nama:\n" + msg.contentMetadata["displayName"] + "\n\nMid:\n" + msg.contentMetadata["mid"] + "\n\nStatus:\n" + contact.statusMessage + "\n\nPhoto Profile:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n\nPhoto Cover:\n" + str(cu))
1282   - else:
1283   - contact = cl.getContact(msg.contentMetadata["mid"])
1284   - try:
1285   - cu = cl.channel.getCover(msg.contentMetadata["mid"])
1286   - except:
1287   - cu = ""
1288   - cl.sendText(msg.to,"Nama:\n" + msg.contentMetadata["displayName"] + "\n\nMid:\n" + msg.contentMetadata["mid"] + "\n\nStatus:\n" + contact.statusMessage + "\n\nPhoto Profile:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n\nPhoto Cover:\n" + str(cu))
1289   -
1290   -
1291   -
1292   - elif msg.text == "Ginfo":
1293   - if msg.toType == 2:
1294   - ginfo = cl.getGroup(msg.to)
1295   - try:
1296   - gCreator = ginfo.creator.displayName
1297   - except:
1298   - gCreator = "Error"
1299   - if wait["lang"] == "JP":
1300   - if ginfo.invitee is None:
1301   - sinvitee = "0"
1302   - else:
1303   - sinvitee = str(len(ginfo.invitee))
1304   - if ginfo.preventJoinByTicket == True:
1305   - u = "close"
1306   - else:
1307   - u = "open"
1308   - cl.sendText(msg.to,"[Group name]\n" + str(ginfo.name) + "\n\n[Gid]\n" + msg.to + "\n\n[Group creator]\n" + gCreator + "\n\n[Profile status]\nhttp://dl.profile.line.naver.jp/" + ginfo.pictureStatus + "\n\nMembers:" + str(len(ginfo.members)) + "members\nPending:" + sinvitee + "people\nURL:" + u + "it is inside")
1309   - else:
1310   - cl.sendText(msg.to,"[group name]\n" + str(ginfo.name) + "\n[gid]\n" + msg.to + "\n[group creator]\n" + gCreator + "\n[profile status]\nhttp://dl.profile.line.naver.jp/" + ginfo.pictureStatus)
1311   - else:
1312   - if wait["lang"] == "JP":
1313   - cl.sendText(msg.to,"Can not be used outside the group")
1314   - else:
1315   - cl.sendText(msg.to,"Not for use less than group")
1316   -
1317   -
1318   -
1319   - elif msg.text is None:
1320   - return
1321   -
1322   - elif msg.text in ["Creator","Owner"]:
1323   - msg.contentType = 13
1324   - msg.contentMetadata = {'mid': tjia}
1325   - cl.sendMessage(msg)
1326   - cl.sendText(msg.to,"Itu Majikan Kami (^_^)")
1327   -
1328   - elif msg.text in ["Admin","admin"]:
1329   - msg.contentType = 13
1330   - admin1 = "u23ad5ddec0dd0523f9caffad673d693c"
1331   - admin2 = "u8b2bb5214c1afc77d06901a535c23e30"
1332   - admin3 = "u57a54b914085fea6f04c19f6fe589057"
1333   - msg.contentMetadata = {'mid': tjia}
1334   - random.choice(KAC).sendMessage(msg)
1335   - msg.contentMetadata = {'mid': admin1}
1336   - random.choice(KAC).sendMessage(msg)
1337   - msg.contentMetadata = {'mid': admin2}
1338   - random.choice(KAC).sendMessage(msg)
1339   - msg.contentMetadata = {'mid': admin3}
1340   - random.choice(KAC).sendMessage(msg)
1341   - random.choice(KAC).sendText(msg.to,"Itu Admin Kami (^_^)")
1342   -
1343   -
1344   -
1345   - elif "Admin add @" in msg.text:
1346   - if msg.from_ in Creator:
1347   - print "[Command]Admin add executing"
1348   - _name = msg.text.replace("Admin add @","")
1349   - _nametarget = _name.rstrip(' ')
1350   - gs = cl.getGroup(msg.to)
1351   - gs = ki.getGroup(msg.to)
1352   - gs = kk.getGroup(msg.to)
1353   - gs = kc.getGroup(msg.to)
1354   - gs = kr.getGroup(msg.to)
1355   - targets = []
1356   - for g in gs.members:
1357   - if _nametarget == g.displayName:
1358   - targets.append(g.mid)
1359   - if targets == []:
1360   - random.choice(KAC).sendText(msg.to,"Contact Tidak Di Temukan")
1361   - else:
1362   - for target in targets:
1363   - try:
1364   - admin.append(target)
1365   - cl.sendText(msg.to,"Admin Chucky Ditambahkan")
1366   - except:
1367   - pass
1368   - print "[Command]Admin add executed"
1369   - else:
1370   - cl.sendText(msg.to,"Command Denied.")
1371   - cl.sendText(msg.to,"Creator Permission Required.")
1372   -
1373   - elif "Admin remove @" in msg.text:
1374   - if msg.from_ in Creator:
1375   - print "[Command]Admin Remove Executing"
1376   - _name = msg.text.replace("Admin remove @","")
1377   - _nametarget = _name.rstrip(' ')
1378   - gs = cl.getGroup(msg.to)
1379   - gs = ki.getGroup(msg.to)
1380   - gs = kk.getGroup(msg.to)
1381   - gs = kc.getGroup(msg.to)
1382   - gs = kr.getGroup(msg.to)
1383   - targets = []
1384   - for g in gs.members:
1385   - if _nametarget == g.displayName:
1386   - targets.append(g.mid)
1387   - if targets == []:
1388   - random.choice(KAC).sendText(msg.to,"Contact Tidak Di Temukan")
1389   - else:
1390   - for target in targets:
1391   - try:
1392   - admin.remove(target)
1393   - cl.sendText(msg.to,"Admin Chucky Dihapus")
1394   - except:
1395   - pass
1396   - print "[Command]Admin remove executed"
1397   - else:
1398   - cl.sendText(msg.to,"Command Denied.")
1399   - cl.sendText(msg.to,"Creator Permission Required.")
1400   -
1401   - elif msg.text in ["Admin list","admin list","List admin"]:
1402   - if admin == []:
1403   - cl.sendText(msg.to,"The Admin List Is Empty")
1404   - else:
1405   - cl.sendText(msg.to,"Tunggu...")
1406   - mc = "╔═════════════════════════\n║ ☆☞ ADMIN CHUCKY ☜☆\n╠═════════════════════════\n"
1407   - for mi_d in admin:
1408   - mc += "╠••> " +cl.getContact(mi_d).displayName + "\n"
1409   - cl.sendText(msg.to,mc + "╚═════════════════════════")
1410   - print "[Command]Admin List executed"
1411   -
1412   -
1413   -
1414   -
1415   - elif msg.text in ["Group creator","Gcreator","gcreator"]:
1416   - ginfo = cl.getGroup(msg.to)
1417   - gCreator = ginfo.creator.mid
1418   - msg.contentType = 13
1419   - msg.contentMetadata = {'mid': gCreator}
1420   - cl.sendMessage(msg)
1421   - cl.sendText(msg.to,"Itu Yang Buat Grup Ini")
1422   -
1423   -
1424   -
1425   - elif msg.contentType == 16:
1426   - if wait["Timeline"] == True:
1427   - msg.contentType = 0
1428   - msg.text = "post URL\n" + msg.contentMetadata["postEndUrl"]
1429   - random.choice(KAC).sendText(msg.to,msg.text)
1430   -
1431   -
1432   - if msg.contentType == 13:
1433   - if wait["steal"] == True:
1434   - _name = msg.contentMetadata["displayName"]
1435   - copy = msg.contentMetadata["mid"]
1436   - groups = cl.getGroup(msg.to)
1437   - pending = groups.invitee
1438   - targets = []
1439   - for s in groups.members:
1440   - if _name in s.displayName:
1441   - print "[Target] Stealed"
1442   - break
1443   - else:
1444   - targets.append(copy)
1445   - if targets == []:
1446   - pass
1447   - else:
1448   - for target in targets:
1449   - try:
1450   - cl.findAndAddContactsByMid(target)
1451   - contact = cl.getContact(target)
1452   - cu = cl.channel.getCover(target)
1453   - path = str(cu)
1454   - image = "http://dl.profile.line-cdn.net/" + contact.pictureStatus
1455   - cl.sendText(msg.to,"Nama :\n" + contact.displayName + "\n\nMid :\n" + msg.contentMetadata["mid"] + "\n\nBio :\n" + contact.statusMessage)
1456   - cl.sendText(msg.to,"Profile Picture " + contact.displayName)
1457   - cl.sendImageWithURL(msg.to,image)
1458   - cl.sendText(msg.to,"Cover " + contact.displayName)
1459   - cl.sendImageWithURL(msg.to,path)
1460   - wait["steal"] = False
1461   - break
1462   - except:
1463   - pass
1464   -
1465   -
1466   - if msg.contentType == 13:
1467   - if wait["gift"] == True:
1468   - _name = msg.contentMetadata["displayName"]
1469   - copy = msg.contentMetadata["mid"]
1470   - groups = cl.getGroup(msg.to)
1471   - pending = groups.invitee
1472   - targets = []
1473   - for s in groups.members:
1474   - if _name in s.displayName:
1475   - print "[Target] Gift"
1476   - break
1477   - else:
1478   - targets.append(copy)
1479   - if targets == []:
1480   - pass
1481   - else:
1482   - for target in targets:
1483   - try:
1484   - cl.sendText(msg.to,"Gift Sudah Terkirim!")
1485   - msg.contentType = 9
1486   - msg.contentMetadata= {'PRDTYPE': 'STICKER',
1487   - 'STKVER': '1',
1488   - 'MSGTPL': '1',
1489   - 'STKPKGID': '1296261'}
1490   - msg.to = target
1491   - msg.text = None
1492   - cl.sendMessage(msg)
1493   - wait['gift'] = False
1494   - break
1495   - except:
1496   - msg.contentMetadata = {'mid': target}
1497   - wait["gift"] = False
1498   - break
1499   -
1500   -
1501   - if msg.contentType == 13:
1502   - if wait['invite'] == True:
1503   - _name = msg.contentMetadata["displayName"]
1504   - invite = msg.contentMetadata["mid"]
1505   - groups = cl.getGroup(msg.to)
1506   - groups = ki.getGroup(msg.to)
1507   - groups = kk.getGroup(msg.to)
1508   - groups = kc.getGroup(msg.to)
1509   - groups = kr.getGroup(msg.to)
1510   - pending = groups.invitee
1511   - targets = []
1512   - for s in groups.members:
1513   - if _name in s.displayName:
1514   - random.choice(KAC).sendText(msg.to, _name + " Berada DiGrup Ini")
1515   - else:
1516   - targets.append(invite)
1517   - if targets == []:
1518   - pass
1519   - else:
1520   - for target in targets:
1521   - try:
1522   - cl.findAndAddContactsByMid(target)
1523   - ki.findAndAddContactsByMid(target)
1524   - kk.findAndAddContactsByMid(target)
1525   - kc.findAndAddContactsByMid(target)
1526   - kr.findAndAddContactsByMid(target)
1527   - random.choice(KAC).inviteIntoGroup(msg.to,[target])
1528   - random.choice(KAC).sendText(msg.to,"Invite " + _name)
1529   - wait['invite'] = False
1530   - break
1531   - except:
1532   - random.choice(KAC).sendText(msg.to,"Limit Invite")
1533   - wait['invite'] = False
1534   - break
1535   -
1536   -
1537   - elif msg.text in ["Key creator","help creator","Help creator"]:
1538   - cl.sendText(msg.to,creatorMessage)
1539   -
1540   - elif msg.text in ["Key group","help group","Help group"]:
1541   - cl.sendText(msg.to,groupMessage)
1542   -
1543   - elif msg.text in ["Key","help","Help"]:
1544   - cl.sendText(msg.to,helpMessage)
1545   -
1546   - elif msg.text in ["Key self","help self","Help self"]:
1547   - cl.sendText(msg.to,selfMessage)
1548   -
1549   - elif msg.text in ["Key bot","help bot","Help bot"]:
1550   - cl.sendText(msg.to,botMessage)
1551   -
1552   - elif msg.text in ["Key set","help set","Help set"]:
1553   - cl.sendText(msg.to,setMessage)
1554   -
1555   - elif msg.text in ["Key media","help media","Help media"]:
1556   - cl.sendText(msg.to,mediaMessage)
1557   -
1558   - elif msg.text in ["Key admin","help admin","Help admin"]:
1559   - cl.sendText(msg.to,adminMessage)
1560   -
1561   -
1562   -
1563   - elif msg.text in ["List group"]:
1564   - gid = cl.getGroupIdsJoined()
1565   - h = ""
1566   - jml = 0
1567   - for i in gid:
1568   - gn = cl.getGroup(i).name
1569   - h += "♦【%s】\n" % (gn)
1570   - jml += 1
1571   - cl.sendText(msg.to,"=======[List Group]=======\n"+ h +"\nTotal Group: "+str(jml))
1572   -
1573   - elif "Ban group: " in msg.text:
1574   - grp = msg.text.replace("Ban group: ","")
1575   - gid = cl.getGroupIdsJoined()
1576   - if msg.from_ in admin:
1577   - for i in gid:
1578   - h = cl.getGroup(i).name
1579   - if h == grp:
1580   - wait["BlGroup"][i]=True
1581   - cl.sendText(msg.to, "Success Ban Group : "+grp)
1582   - else:
1583   - pass
1584   - else:
1585   - cl.sendText(msg.to, "Khusus Nadya")
1586   -
1587   - elif msg.text in ["List ban","List ban group"]:
1588   - if msg.from_ in admin:
1589   - if wait["BlGroup"] == {}:
1590   - random.choice(KAC).sendText(msg.to,"Tidak Ada")
1591   - else:
1592   - mc = ""
1593   - for gid in wait["BlGroup"]:
1594   - mc += "-> " +cl.getGroup(gid).name + "\n"
1595   - random.choice(KAC).sendText(msg.to,"===[Ban Group]===\n"+mc)
1596   - else:
1597   - cl.sendText(msg.to, "Khusus Admin")
1598   -
1599   - elif msg.text in ["Del ban: "]:
1600   - if msg.from_ in admin:
1601   - ng = msg.text.replace("Del ban: ","")
1602   - for gid in wait["BlGroup"]:
1603   - if cl.getGroup(gid).name == ng:
1604   - del wait["BlGroup"][gid]
1605   - cl.sendText(msg.to, "Success del ban "+ng)
1606   - else:
1607   - pass
1608   - else:
1609   - cl.sendText(msg.to, "Khusus Nadya")
1610   -
1611   - elif "Join group: " in msg.text:
1612   - ng = msg.text.replace("Join group: ","")
1613   - gid = cl.getGroupIdsJoined()
1614   - gid = ki.getGroupIdsJoined()
1615   - gid = kk.getGroupIdsJoined()
1616   - gid = kc.getGroupIdsJoined()
1617   - gid = kr.getGroupIdsJoined()
1618   - try:
1619   - if msg.from_ in Creator:
1620   - for i in gid:
1621   - h = cl.getGroup(i).name
1622   - h = ki.getGroup(i).name
1623   - h = kk.getGroup(i).name
1624   - h = kc.getGroup(i).name
1625   - h = kr.getGroup(i).name
1626   - if h == ng:
1627   - random.choice(KAC).inviteIntoGroup(i,[Creator])
1628   - cl.sendText(msg.to,"Success Join To ["+ h +"] Group")
1629   - else:
1630   - pass
1631   - else:
1632   - cl.sendText(msg.to,"Khusus Nadya")
1633   - except Exception as e:
1634   - cl.sendText(msg.to, str(e))
1635   -
1636   - elif "Leave group: " in msg.text:
1637   - ng = msg.text.replace("Leave group: ","")
1638   - gid = cl.getGroupIdsJoined()
1639   - if msg.from_ in Creator:
1640   - for i in gid:
1641   - h = cl.getGroup(i).name
1642   - if h == ng:
1643   - cl.sendText(i,"Bot Di Paksa Keluar Oleh Owner!")
1644   - cl.leaveGroup(i)
1645   - ki.leaveGroup(i)
1646   - kk.leaveGroup(i)
1647   - kc.leaveGroup(i)
1648   - kr.leaveGroup(i)
1649   - cl.sendText(msg.to,"Success Left ["+ h +"] group")
1650   - else:
1651   - pass
1652   - else:
1653   - cl.sendText(msg.to,"Khusus Nadya")
1654   -
1655   - elif "Leave all group" == msg.text:
1656   - gid = cl.getGroupIdsJoined()
1657   - if msg.from_ in Creator:
1658   - for i in gid:
1659   - cl.sendText(i,"Bot Di Paksa Keluar Oleh Owner!")
1660   - cl.leaveGroup(i)
1661   - ki.leaveGroup(i)
1662   - kk.leaveGroup(i)
1663   - kc.leaveGroup(i)
1664   - kr.leaveGroup(i)
1665   - cl.sendText(msg.to,"Success Leave All Group")
1666   - else:
1667   - cl.sendText(msg.to,"Khusus Nadya")
1668   -
1669   -
1670   - elif "Pict group: " in msg.text:
1671   - saya = msg.text.replace('Pict group: ','')
1672   - gid = cl.getGroupIdsJoined()
1673   - for i in gid:
1674   - h = cl.getGroup(i).name
1675   - gna = cl.getGroup(i)
1676   - if h == saya:
1677   - cl.sendImageWithURL(msg.to,"http://dl.profile.line.naver.jp/"+ gna.pictureStatus)
1678   -
1679   -
1680   - elif msg.text in ["cancelall","Cancelall"]:
1681   - if msg.toType == 2:
1682   - X = cl.getGroup(msg.to)
1683   - if X.invitee is not None:
1684   - gInviMids = [contact.mid for contact in X.invitee]
1685   - cl.cancelGroupInvitation(msg.to, gInviMids)
1686   - else:
1687   - cl.sendText(msg.to,"Tidak Ada Yang Pending")
1688   - else:
1689   - cl.sendText(msg.to,"Tidak Bisa Digunakan Diluar Group")
1690   -
1691   - elif msg.text in ["Ourl","Url on"]:
1692   - if msg.toType == 2:
1693   - X = cl.getGroup(msg.to)
1694   - X.preventJoinByTicket = False
1695   - cl.updateGroup(X)
1696   - cl.sendText(msg.to,"Url Sudah Aktif")
1697   - else:
1698   - cl.sendText(msg.to,"Can not be used outside the group")
1699   -
1700   - elif msg.text in ["Curl","Url off"]:
1701   - if msg.toType == 2:
1702   - X = cl.getGroup(msg.to)
1703   - X.preventJoinByTicket = True
1704   - cl.updateGroup(X)
1705   - cl.sendText(msg.to,"Url Sudah Di Nonaktifkan")
1706   -
1707   - else:
1708   - cl.sendText(msg.to,"Can not be used outside the group")
1709   -
1710   - elif msg.text in ["Join on","Autojoin on"]:
1711   - if msg.from_ in admin:
1712   - wait["AutoJoin"] = True
1713   - wait["AutoJoinCancel"] = False
1714   - cl.sendText(msg.to,"Auto Join Sudah Aktif")
1715   - else:
1716   - cl.sendText(msg.to,"Khusus Nadya")
1717   -
1718   - elif msg.text in ["Join off","Autojoin off"]:
1719   - if msg.from_ in admin:
1720   - wait["AutoJoin"] = False
1721   - cl.sendText(msg.to,"Auto Join Sudah Di Nonaktifkan")
1722   - else:
1723   - cl.sendText(msg.to,"Khusus Nadya")
1724   -
1725   -
1726   - elif msg.text in ["Joincancel on","Autojoincancel on"]:
1727   - if msg.from_ in admin:
1728