Commit 99ac336e1e2b492895c96df1abcc7d5d4276945d

Authored by Nadya Sutjiadi
Committed by GitHub
1 parent cb539d85

Add files via upload

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