diff --git a/nanda b/nanda new file mode 100644 index 0000000..2a72139 --- /dev/null +++ b/nanda @@ -0,0 +1,2578 @@ +# -*- coding: utf-8 -*- + +import TOBY +from TOBY.lib.curve.ttypes import * +from datetime import datetime +import time,random,sys,json,codecs,threading,glob + +cl = TOBY.LINE() +cl.login(qr=True) +cl.loginResult() + +ki = TOBY.LINE() +ki.login(qr=True) +ki.loginResult() + +ki2 = TOBY.LINE() +ki2.login(qr=True) +ki2.loginResult() + +print u"login success" +reload(sys) +sys.setdefaultencoding('utf-8') + +helpMessage =""" ==[NABOTO]== + +􀜁􀇔􏿿 [Id] +􀜁􀇔􏿿 [Mid] +􀜁􀇔􏿿 [Me] +􀜁􀇔􏿿 [TL 「Text」 +􀜁􀇔􏿿 [MyName] +􀜁􀇔􏿿 [I Gift] +􀜁􀇔􏿿 [Mid 「mid」 +􀜁􀇔􏿿 [Group id] +􀜁􀇔􏿿 [Group cancel] +􀜁􀇔􏿿 [Tagall] +􀜁􀇔􏿿 [Sider] +􀜁􀇔􏿿 [Read] +􀜁􀇔􏿿 [album 「id」] +􀜁􀇔􏿿 [Hapus album 「id」 +􀜁􀇔􏿿 [Contact on] +􀜁􀇔􏿿 [Contact off] +􀜁􀇔􏿿 [Auto join on] +􀜁􀇔􏿿 [Auto join off] +􀜁􀇔􏿿 [Cancelall] +􀜁􀇔􏿿 [Cleanse] +􀜁􀇔􏿿 [Auto leave on] +􀜁􀇔􏿿 [Auto leave off] +􀜁􀇔􏿿 [Auto add on/off] +􀜁􀇔􏿿 [Jam on] +􀜁􀇔􏿿 [Jam off] +􀜁􀇔􏿿 [Jam say] +􀜁􀇔􏿿 [UP] +􀜁􀇔􏿿 [Ban:on] +􀜁􀇔􏿿 [Unban:on] +􀜁􀇔􏿿 [Banlist] +􀜁􀇔􏿿 [Com on] +􀜁􀇔􏿿 [Com set] +􀜁􀇔􏿿 [Mcheck] +􀜁􀇔􏿿 [Message Confirmation] +􀜁􀇔􏿿 [Mybio: 「Isi Bio」] +􀜁􀇔􏿿 [Allbio: 「Isi Bio bot」] +􀜁􀇔􏿿 [Link on] +􀜁􀇔􏿿 [Link off] +􀜁􀇔􏿿 [Invite「mid」] +􀜁􀇔􏿿 [Kmid: Kick by mid] +􀜁􀇔􏿿 [Ginfo] +􀜁􀇔􏿿 [Cancel] +􀜁􀇔􏿿 [Copy @] +􀜁􀇔􏿿 [Backup] +􀜁􀇔􏿿 [Kuy] +􀜁􀇔􏿿 [Papay] +􀜁􀇔􏿿 [Gn 「Nama grup」 +􀜁􀇔􏿿 [Gurl] +􀜁􀇔􏿿 [gurl「kelompok ID +􀜁􀇔􏿿 [Nk「nama」] +􀜁􀇔􏿿 [NK:] +􀜁􀇔􏿿 [Ban:] +􀜁􀇔􏿿 [Unban:] +􀜁􀇔􏿿 [Protect on] +􀜁􀇔􏿿 [qrprotect on/off] +􀜁􀇔􏿿 [Inviteprotect on] +􀜁􀇔􏿿 [Cancelprotect on] +􀜁􀇔􏿿 [Staff add/remove @] + ✯==== Creator ====✯ + + http://line.me/ti/p/~wota_id +""" +helo="" + +KAC=[cl,ki] +mid = cl.getProfile().mid +kimid = ki.getProfile().mid +ki2mid = ki2.getProfile().mid +Bots = [mid,kimid,ki2mid] +admsa = "uc3349290aa2cab6ca6d8d40f0b46eb9c +admin = "uc3349290aa2cab6ca6d8d40f0b46eb9c" + +wait = { + 'contact':False, + 'autoJoin':True, + 'autoCancel':{"on":False,"members":50}, + 'leaveRoom':True, + 'timeline':False, + 'autoAdd':True, + 'message':"Thanks For Add Me", + "lang":"JP", + "comment":"Thanks For Add Me", + "commentOn":False, + "commentBlack":{}, + "wblack":False, + "dblack":False, + "clock":False, + "cNames":"", + "cNames":"", + "blacklist":{}, + "wblacklist":False, + "dblacklist":False, + "protect":True, + "cancelprotect":False, + "inviteprotect":False, + "linkprotect":False, +} + +wait2 = { + 'readPoint':{}, + 'readMember':{}, + 'setTime':{}, + 'ROM':{} + } + +setTime = {} +setTime = wait2['setTime'] + +contact = cl.getProfile() +mybackup = cl.getProfile() +mybackup.displayName = contact.displayName +mybackup.statusMessage = contact.statusMessage +mybackup.pictureStatus = contact.pictureStatus + +contact = ki.getProfile() +backup = ki.getProfile() +backup.displayName = contact.displayName +backup.statusMessage = contact.statusMessage +backup.pictureStatus = contact.pictureStatus + +def cms(string, commands): #/XXX, >XXX, ;XXX, ^XXX, %XXX, $XXX... + tex = ["+","@","/",">",";","^","%","$","^","サテラ:","サテラ:","サテラ:","サテラ:"] + for texX in tex: + for command in commands: + if string ==command: + return True + return False + +def bot(op): + try: + if op.type == 0: + return + if op.type == 13: + if mid in op.param3: + G = cl.getGroup(op.param1) + if wait["autoJoin"] == True: + if wait["autoCancel"]["on"] == True: + if len(G.members) <= wait["autoCancel"]["members"]: + cl.rejectGroupInvitation(op.param1) + else: + cl.acceptGroupInvitation(op.param1) + else: + cl.acceptGroupInvitation(op.param1) + elif wait["autoCancel"]["on"] == True: + if len(G.members) <= wait["autoCancel"]["members"]: + cl.rejectGroupInvitation(op.param1) + else: + Inviter = op.param3.replace("",',') + InviterX = Inviter.split(",") + matched_list = [] + for tag in wait["blacklist"]: + matched_list+=filter(lambda str: str == tag, InviterX) + if matched_list == []: + pass + else: + cl.cancelGroupInvitation(op.param1, matched_list) + if op.type == 19: + if mid in op.param3: + wait["blacklist"][op.param2] = True + if op.type == 22: + if wait["leaveRoom"] == True: + cl.leaveRoom(op.param1) + if op.type == 24: + if wait["leaveRoom"] == True: + cl.leaveRoom(op.param1) + if op.type == 26: + msg = op.message + if msg.toType == 0: + msg.to = msg.from_ + if msg.from_ == "uc3349290aa2cab6ca6d8d40f0b46eb9c": + if "join:" in msg.text: + list_ = msg.text.split(":") + try: + cl.acceptGroupInvitationByTicket(list_[1],list_[2]) + G = cl.getGroup(list_[1]) + G.preventJoinByTicket = True + cl.updateGroup(G) + except: + cl.sendText(msg.to,"error") + if msg.toType == 1: + if wait["leaveRoom"] == True: + cl.leaveRoom(msg.to) + if msg.contentType == 16: + url = msg.contentMetadata["postEndUrl"] + cl.like(url[25:58], url[66:], likeType=1001) + if op.type == 25: + msg = op.message + if msg.contentType == 13: + if wait["winvite"] == True: + if msg.from_ in admin: + _name = msg.contentMetadata["displayName"] + invite = msg.contentMetadata["mid"] + groups = cl.getGroup(msg.to) + pending = groups.invitee + targets = [] + for s in groups.members: + if _name in s.displayName: + cl.sendText(msg.to,"-> " + _name + " was here") + break + elif invite in wait["blacklist"]: + ki.sendText(msg.to,"Sorry, " + _name + " On Blacklist") + ki.sendText(msg.to,"Call my daddy to use command !, \n➡Unban: " + invite) + break + else: + targets.append(invite) + if targets == []: + pass + else: + for target in targets: + try: + cl.findAndAddContactsByMid(target) + cl.inviteIntoGroup(msg.to,[target]) + cl.sendText(msg.to,"Done Invite : \n➡" + _name) + wait["winvite"] = False + break + except: + try: + ki.findAndAddContactsByMid(invite) + ki.inviteIntoGroup(op.param1,[invite]) + wait["winvite"] = False + except: + cl.sendText(msg.to,"Negative, Error detected") + wait["winvite"] = False + break + if msg.contentType == 13: + if wait["wblack"] == True: + if msg.contentMetadata["mid"] in wait["commentBlack"]: + cl.sendText(msg.to,"sudah masuk daftar hitam👈") + wait["wblack"] = False + else: + wait["commentBlack"][msg.contentMetadata["mid"]] = True + wait["wblack"] = False + cl.sendText(msg.to,"Itu tidak berkomentar👈") + elif wait["dblack"] == True: + if msg.contentMetadata["mid"] in wait["commentBlack"]: + del wait["commentBlack"][msg.contentMetadata["mid"]] + cl.sendText(msg.to,"Done") + wait["dblack"] = False + else: + wait["dblack"] = False + cl.sendText(msg.to,"Tidak ada dalam daftar hitam👈") + elif wait["wblacklist"] == True: + if msg.contentMetadata["mid"] in wait["blacklist"]: + cl.sendText(msg.to,"sudah masuk daftar hitam") + wait["wblacklist"] = False + else: + wait["blacklist"][msg.contentMetadata["mid"]] = True + wait["wblacklist"] = False + cl.sendText(msg.to,"Done👈") + elif wait["dblacklist"] == True: + if msg.contentMetadata["mid"] in wait["blacklist"]: + del wait["blacklist"][msg.contentMetadata["mid"]] + cl.sendText(msg.to,"Done👈") + wait["dblacklist"] = False + else: + wait["dblacklist"] = False + cl.sendText(msg.to,"Done👈") + elif wait["contact"] == True: + msg.contentType = 0 + cl.sendText(msg.to,msg.contentMetadata["mid"]) + if 'displayName' in msg.contentMetadata: + contact = cl.getContact(msg.contentMetadata["mid"]) + try: + cu = cl.channel.getCover(msg.contentMetadata["mid"]) + except: + cu = "" + cl.sendText(msg.to,"[displayName]:\n" + msg.contentMetadata["displayName"] + "\n[mid]:\n" + msg.contentMetadata["mid"] + "\n[statusMessage]:\n" + contact.statusMessage + "\n[pictureStatus]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[coverURL]:\n" + str(cu)) + else: + contact = cl.getContact(msg.contentMetadata["mid"]) + try: + cu = cl.channel.getCover(msg.contentMetadata["mid"]) + except: + cu = "" + cl.sendText(msg.to,"[displayName]:\n" + contact.displayName + "\n[mid]:\n" + msg.contentMetadata["mid"] + "\n[statusMessage]:\n" + contact.statusMessage + "\n[pictureStatus]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[coverURL]:\n" + str(cu)) + elif msg.contentType == 16: + if wait["timeline"] == True: + msg.contentType = 0 + if wait["lang"] == "JP": + msg.text = "menempatkan URL\n" + msg.contentMetadata["postEndUrl"] + else: + msg.text = "URL→\n" + msg.contentMetadata["postEndUrl"] + cl.sendText(msg.to,msg.text) + elif msg.text is None: + return + elif msg.text.lower() == 'Help': + if wait["lang"] == "JP": + cl.sendText(msg.to,helpMessage) + else: + cl.sendText(msg.to,helpMessage) + elif msg.text in ["Invite:on"]: + if msg.from_ in admin: + wait["winvite"] = True + cl.sendText(msg.to,"send contact") + elif ("Gn:" in msg.text): + if msg.toType == 2: + group = cl.getGroup(msg.to) + group.name = msg.text.replace("Gn:","") + ki.updateGroup(group) + else: + cl.sendText(msg.to,"Hal ini tidak dapat digunakan di luar kelompok👈") + elif ("Gn " in msg.text): + if msg.toType == 2: + group = cl.getGroup(msg.to) + group.name = msg.text.replace("Gn ","") + cl.updateGroup(group) + else: + cl.sendText(msg.to,"Can not be used for groups other than") + elif "Kick:" in msg.text: + midd = msg.text.replace("Kick:","") + cl.kickoutFromGroup(msg.to,[midd]) + elif "Invite:" in msg.text: + midd = msg.text.replace("Invite:","") + cl.findAndAddContactsByMid(midd) + cl.inviteIntoGroup(msg.to,[midd]) + elif "bot" == msg.text: + msg.contentType = 13 + msg.contentMetadata = {'mid': kimid} + cl.sendMessage(msg) + msg.contentType = 13 + msg.contentMetadata = {'mid': ki2mid} + cl.sendMessage(msg) + msg.contentType = 13 + elif "Bot1" == msg.text: + msg.contentType = 13 + msg.contentMetadata = {'mid': kimid} + ki.sendMessage(msg) + elif "Bot2" == msg.text: + msg.contentType = 13 + msg.contentMetadata = {'mid': ki2mid} + ki2.sendMessage(msg) + + elif msg.text in ["Punk Gift","Punk1 gift"]: + msg.contentType = 9 + msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020', + 'PRDTYPE': 'THEME', + 'MSGTPL': '2'} + msg.text = None + ki.sendMessage(msg) + elif msg.text in ["Gift","gift"]: + msg.contentType = 9 + msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020', + 'PRDTYPE': 'THEME', + 'MSGTPL': '3'} + msg.text = None + cl.sendMessage(msg) + + elif msg.text in ["Punk2 Gift","Punk2 gift"]: + msg.contentType = 9 + msg.contentMetadata={'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020', + 'PRDTYPE': 'THEME', + 'MSGTPL': '3'} + msg.text = None + ki2.sendMessage(msg) + + elif msg.text in ["B Cancel","Cancel dong","B cancel"]: + if msg.toType == 2: + group = ki.getGroup(msg.to) + if group.invitee is not None: + gInviMids = [contact.mid for contact in group.invitee] + ki.cancelGroupInvitation(msg.to, gInviMids) + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"No invites👈") + else: + cl.sendText(msg.to,"Invite people inside not👈") + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Tidak ada undangan") + else: + cl.sendText(msg.to,"invitan tidak ada") + + elif msg.text in ["Cancel","cancel"]: + if msg.toType == 2: + group = cl.getGroup(msg.to) + if group.invitee is not None: + gInviMids = [contact.mid for contact in group.invitee] + cl.cancelGroupInvitation(msg.to, gInviMids) + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"No invites👈") + else: + cl.sendText(msg.to,"Invite people inside not👈") + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Tidak ada undangan👈") + else: + cl.sendText(msg.to,"invitan tidak ada") + #elif "gurl" == msg.text: + #print cl.getGroup(msg.to) + ##cl.sendMessage(msg) + elif msg.text in ["Link on"]: + if msg.toType == 2: + group = cl.getGroup(msg.to) + group.preventJoinByTicket = False + cl.updateGroup(group) + if wait["lang"] == "JP": + cl.sendText(msg.to,"URL open") + else: + cl.sendText(msg.to,"URL open") + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"It can not be used outside the group ô€œô€„‰👈") + else: + cl.sendText(msg.to,"Can not be used for groups other than ô€œô€„‰") + elif msg.text in ["Link off"]: + if msg.toType == 2: + group = cl.getGroup(msg.to) + group.preventJoinByTicket = True + cl.updateGroup(group) + if wait["lang"] == "JP": + cl.sendText(msg.to,"URL close👈") + else: + cl.sendText(msg.to,"URL close👈") + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"It can not be used outside the group 👈") + else: + cl.sendText(msg.to,"Can not be used for groups other than ô€œ") + elif "Ginfo" == msg.text: + ginfo = cl.getGroup(msg.to) + try: + gCreator = ginfo.creator.displayName + except: + gCreator = "Error" + if wait["lang"] == "JP": + if ginfo.invitee is None: + sinvitee = "0" + else: + sinvitee = str(len(ginfo.invitee)) + msg.contentType = 13 + msg.contentMetadata = {'mid': ginfo.creator.mid} + cl.sendText(msg.to,"[Nama]\n" + str(ginfo.name) + "\n[Group Id]\n" + msg.to + "\n\n[Group Creator]\n" + gCreator + "\n\nAnggota:" + str(len(ginfo.members)) + "\nInvitation:" + sinvitee + "") + cl.sendMessage(msg) + elif "Contact" == msg.text: + msg.contentType = 13 + msg.contentMetadata = {'mid': msg.to} + cl.sendMessage(msg) + elif "Mymid" == msg.text: + cl.sendText(msg.to,mid) + elif "Punk1 mid" == msg.text: + ki.sendText(msg.to,kimid) + elif "Punk2 mid" == msg.text: + ki2.sendText(msg.to,ki2mid) + elif "Punk3 mid" == msg.text: + ki3.sendText(msg.to,kimid) + elif "Punk4 mid" == msg.text: + ki4.sendText(msg.to,ki2mid) + elif "Punk5 mid" == msg.text: + ki5.sendText(msg.to,kimid) + elif "Punk6 mid" == msg.text: + ki6.sendText(msg.to,ki2mid) + elif "all mid" == msg.text: + ki.sendText(msg.to,kimid) + ki2.sendText(msg.to,ki2mid) + ki3.sendText(msg.to,ki3mid) + ki4.sendText(msg.to,ki4mid) + ki5.sendText(msg.to,ki5mid) + ki6.sendText(msg.to,ki5mid) + elif "TL:" in msg.text: + tl_text = msg.text.replace("TL:","") + cl.sendText(msg.to,"line://home/post?userMid="+mid+"&postId="+cl.new_post(tl_text)["result"]["post"]["postInfo"]["postId"]) + elif "All:" in msg.text: + string = msg.text.replace("All:","") + if len(string.decode('utf-8')) <= 20: + profile = ki.getProfile() + profile.displayName = string + ki.updateProfile(profile) + elif "Allbio:" in msg.text: + string = msg.text.replace("Allbio:","") + if len(string.decode('utf-8')) <= 500: + profile = ki.getProfile() + profile.statusMessage = string + ki.updateProfile(profile) + elif "Myname:" in msg.text: + string = msg.text.replace("Myname:","") + if len(string.decode('utf-8')) <= 20: + profile = cl.getProfile() + profile.displayName = string + cl.updateProfile(profile) + cl.sendText(msg.to,"􀜁􀇔􏿿Update Names👉 " + string + "👈") + +#-------------Fungsi Tag All Start---------------# + elif msg.text in ["Sepi","Tagall"]: + group = cl.getGroup(msg.to) + nama = [contact.mid for contact in group.members] + + cb = "" + cb2 = "" + strt = int(0) + akh = int(0) + for md in nama: + akh = akh + int(6) + + cb += """{"S":"""+json.dumps(str(strt))+""","E":"""+json.dumps(str(akh))+""","M":"""+json.dumps(md)+"},""" + + strt = strt + int(7) + akh = akh + 1 + cb2 += "@nrik \n" + + cb = (cb[:int(len(cb)-1)]) + msg.contentType = 0 + msg.text = cb2 + msg.contentMetadata ={'MENTION':'{"MENTIONEES":['+cb+']}','EMTVER':'4'} + + try: + cl.sendMessage(msg) + except Exception as error: + print error +#-------------Fungsi Tag All Finish---------------# + +#--------------------------------------------------------- + elif "1Punkname:" in msg.text: + string = msg.text.replace("1name:","") + if len(string.decode('utf-8')) <= 20: + profile = ki.getProfile() + profile.displayName = string + cl.updateProfile(profile) + cl.sendText(msg.to,"􀜁􀇔��Update Names👉" + string + "👈") +#-------------------------------------------------------- + elif "2Punkname:" in msg.text: + string = msg.text.replace("2name:","") + if len(string.decode('utf-8')) <= 20: + profile = ki2.getProfile() + profile.displayName = string + ki.updateProfile(profile) + ki.sendText(msg.to,"􀜁􀇔􏿿Update Names👉" + string + "👈") +#--------------------------------------------------------- + elif "Mid:" in msg.text: + mmid = msg.text.replace("Mid:","") + msg.contentType = 13 + msg.contentMetadata = {"mid":mmid} + cl.sendMessage(msg) + elif msg.text.lower() == 'contact on': + if wait["contact"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Sudah On") + else: + cl.sendText(msg.to,"It is already open") + else: + wait["contact"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already open 👈") + else: + cl.sendText(msg.to,"It is already open 􀜁􀇔􏿿") + elif msg.text.lower() == 'contact off': + if wait["contact"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"sudah off ô€œô€„‰👈") + else: + cl.sendText(msg.to,"It is already off ô€œô€„‰👈") + else: + wait["contact"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"off ô€œô€„‰already") + else: + cl.sendText(msg.to,"already Close ô€œô€„‰👈") + elif msg.text.lower() == 'protect on': + if wait["protect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Ini sudah on 􀜁􀇔􏿿👈") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka ô€¨👈") + else: + wait["protect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already ON􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already On ô€¨") + elif msg.text.lower() == 'qrprotect on': + if wait["linkprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Ini sudah on 􀜁􀇔��👈") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka ô€¨👈") + else: + wait["linkprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already ON􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already On ô€¨") + elif msg.text.lower() == 'inviteprotect on': + if wait["inviteprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Ini sudah on 􀜁􀇔􏿿👈") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka ô€¨����👈") + else: + wait["inviteprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already ON􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already On ô€¨") + elif msg.text.lower() == 'cancelprotect on': + if wait["cancelprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Ini sudah on 􀜁􀇔􏿿👈") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka ô€¨👈") + else: + wait["cancelprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already ON􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already On ô€¨") + elif msg.text.lower() == 'auto join on': + if wait["autoJoin"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Ini sudah off 􀜁􀇔􏿿👈") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka ô€¨👈") + else: + wait["autoJoin"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"already ON􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already On ô€¨") + elif msg.text.lower() == 'blocklist': + blockedlist = cl.getBlockedContactIds() + cl.sendText(msg.to, "Please wait...") + kontak = cl.getContacts(blockedlist) + num=1 + msgs="User Blocked List\n" + for ids in kontak: + msgs+="\n%i. %s" % (num, ids.displayName) + num=(num+1) + msgs+="\n\nTotal %i blocked user(s)" % len(kontak) + cl.sendText(msg.to, msgs) + elif msg.text in ["Allprotect on","Mode on"]: + if msg.from_ in admin: + if wait["inviteprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + else: + cl.sendText(msg.to,"") + else: + wait["inviteprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + if wait["cancelprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + else: + cl.sendText(msg.to,"") + else: + wait["cancelprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + if wait["protect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + else: + cl.sendText(msg.to,"") + else: + wait["protect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + else: + cl.sendText(msg.to,"") + if wait["linkprotect"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"") + else: + cl.sendText(msg.to,"") + else: + wait["linkprotect"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"Already On") + else: + cl.sendText(msg.to,"done") + elif msg.text in ["Allprotect off","Mode Off"]: + if msg.from_ in admin: + if wait["inviteprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect Invite Off") + else: + cl.sendText(msg.to,"Invite OFF") + else: + wait["inviteprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect Invite Off") + if wait["cancelprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect Cancel Off") + else: + cl.sendText(msg.to,"done") + else: + wait["cancelprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect Cancel Off") + if wait["protect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Block Off") + else: + cl.sendText(msg.to,"done") + else: + wait["protect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Block Off") + else: + cl.sendText(msg.to,"done") + if wait["linkprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect QR Off") + else: + cl.sendText(msg.to,"done") + else: + wait["linkprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Protect QR Off") + else: + cl.sendText(msg.to,"done") + elif msg.text.lower() == 'auto join off': + if wait["autoJoin"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Auto Join Already Off") + else: + cl.sendText(msg.to,"Auto Join set off") + else: + wait["autoJoin"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"already close") + else: + cl.sendText(msg.to,"It is already open ô€œ👈") + elif msg.text in ["Protect off"]: + if wait["protect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"hall ini sudah off ô€œ👈") + else: + cl.sendText(msg.to,"sudah dimatikan ô€œô€„‰👈") + else: + wait["protect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"already close") + else: + cl.sendText(msg.to,"It is already open ô€œ👈") + elif msg.text in ["Qrprotect off","qrprotect off"]: + if wait["linkprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"hall ini sudah off ô€œ👈") + else: + cl.sendText(msg.to,"sudah dimatikan ô€œô€„‰👈") + else: + wait["linkprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"already close") + else: + cl.sendText(msg.to,"It is already open ô€œ👈") + elif msg.text in ["Inviteprotect off"]: + if wait["inviteprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"hall ini sudah off ô€œ👈") + else: + cl.sendText(msg.to,"sudah dimatikan ô€œô€„‰👈") + else: + wait["inviteprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"already close") + else: + cl.sendText(msg.to,"It is already open ô€œ👈") + elif msg.text in ["Cancelprotect off"]: + if wait["cancelprotect"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"hall ini sudah off ô€œ👈") + else: + cl.sendText(msg.to,"sudah dimatikan ô€œô€„‰👈") + else: + wait["cancelprotect"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"already close") + else: + cl.sendText(msg.to,"It is already open ô€œ👈") + elif "Group cancel:" in msg.text: + try: + strnum = msg.text.replace("Group cancel:","") + if strnum == "off": + wait["autoCancel"]["on"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Itu off undangan ditolak👈\nSilakan kirim dengan menentukan jumlah orang ketika Anda menghidupkan👈") + else: + cl.sendText(msg.to,"Off undangan ditolak👈Sebutkan jumlah terbuka ketika Anda ingin mengirim") + else: + num = int(strnum) + wait["autoCancel"]["on"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,strnum + "Kelompok berikut yang diundang akan ditolak secara otomatis👈") + else: + cl.sendText(msg.to,strnum + "The team declined to create the following automatic invitation") + except: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Nilai tidak benar👈") + else: + cl.sendText(msg.to,"Weird value🛡") + elif msg.text in ["Auto leave on","Auto leave: on"]: + if wait["leaveRoom"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"on👈􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"Sudah terbuka 􀜁􀇔􏿿") + else: + wait["leaveRoom"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"Done👈􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"Is already open👈􀜁􀇔􏿿") + elif msg.text in ["Auto leave off","Auto leave: off"]: + if wait["leaveRoom"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"on👈􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"Sudah off👈􀜁􀇔􏿿") + else: + wait["leaveRoom"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Done👈􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"Is already close👈􀜁􀇔􏿿") + elif msg.text in ["Share on","share on"]: + if wait["timeline"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Done 􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"Hal ini sudah terbuka👈") + else: + wait["timeline"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"on👈") + else: + cl.sendText(msg.to,"on👈") + elif msg.text in ["Share off","share off"]: + if wait["timeline"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Done👈􀜁􀇔􏿿") + else: + cl.sendText(msg.to,"It is already turned off 􀜁􀇔􏿿👈") + else: + wait["timeline"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Off👈") + else: + cl.sendText(msg.to,"Off👈") + elif msg.text.lower() == 'set': + md = "" + if wait["contact"] == True: md+="􀜁􀇔􏿿 Contact:on 􀜁􀄯􏿿\n" + else: md+="􀜁􀇔􏿿 Contact:off􀜁􀄰􏿿\n" + if wait["autoJoin"] == True: md+="􀜁􀇔􏿿 Auto Join:on 􀜁􀄯􏿿\n" + else: md +="􀜁􀇔􏿿 Auto Join:off􀜁􀄰􏿿\n" + if wait["autoCancel"]["on"] == True:md+="􀜁􀇔􏿿 Auto cancel:" + str(wait["autoCancel"]["members"]) + "􀜁􀄯􏿿\n" + else: md+= "􀜁􀇔􏿿 Group cancel:off 􀜁􀄰􏿿\n" + if wait["leaveRoom"] == True: md+="􀜁􀇔􏿿 Auto leave:on 􀜁􀄯􏿿\n" + else: md+="􀜁􀇔􏿿 Auto leave:off 􀜁􀄰􏿿\n" + if wait["timeline"] == True: md+="􀜁􀇔���� Share:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Share:off 􀜁􀄰􏿿\n" + if wait["autoAdd"] == True: md+="􀜁􀇔􏿿 Auto add:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Auto add:off 􀜁􀄰􏿿\n" + if wait["commentOn"] == True: md+="􀜁􀇔􏿿 Auto komentar:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Auto komentar:off 􀜁􀄰􏿿\n" + if wait["protect"] == True: md+="􀜁􀇔􏿿 Protect:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Protect:off 􀜁􀄰􏿿\n" + if wait["linkprotect"] == True: md+="􀜁􀇔􏿿Link Protect:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Link Protect:off 􀜁􀄰􏿿\n" + if wait["inviteprotect"] == True: md+="􀜁􀇔􏿿Invitation Protect:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Invitation Protect:off 􀜁􀄰􏿿\n" + if wait["cancelprotect"] == True: md+="􀜁􀇔􏿿Cancel Protect:on 􀜁􀄯􏿿\n" + else:md+="􀜁􀇔􏿿 Cancel Protect:off 􀜁􀄰􏿿\n" + cl.sendText(msg.to,md) + msg.contentType = 13 + msg.contentMetadata = {'mid': admsa} + cl.sendMessage(msg) + elif msg.text.lower() == 'me': + msg.contentType = 13 + msg.contentMetadata = {'mid': mid} + cl.sendMessage(msg) + elif cms(msg.text,["creator","Creator"]): + msg.contentType = 13 + msg.contentMetadata = {'mid': admsa} + cl.sendText(msg.to,"􀜁􀇔􏿿 My Creator 􀜁􀇔􏿿 ") + cl.sendMessage(msg) + cl.sendText(msg.to,"􀜁􀇔􏿿 Dont Kick out From group 􀜁􀇔􏿿 ") + elif msg.text in ["Cancelall"]: + if msg.from_ in admin: + gid = cl.getGroupIdsInvited() + for i in gid: + cl.rejectGroupInvitation(i) + if wait["lang"] == "JP": + cl.sendText(msg.to,"All invitations have been refused") + else: + cl.sendText(msg.to,"拒绝了全部的邀请。") + elif "Set album:" in msg.text: + gid = msg.text.replace("Set album:","") + album = cl.getAlbum(gid) + if album["result"]["items"] == []: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Tidak ada album👈") + else: + cl.sendText(msg.to,"Dalam album tidak👈") + else: + if wait["lang"] == "JP": + mg = "Berikut ini adalah album dari target" + else: + mg = "Berikut ini adalah subjek dari album" + for y in album["result"]["items"]: + if "photoCount" in y: + mg += str(y["title"]) + ":" + str(y["photoCount"]) + "æžš\n" + else: + mg += str(y["title"]) + ":0 Pieces\n" + cl.sendText(msg.to,mg) + elif "Album" in msg.text: + gid = msg.text.replace("Album","") + album = cl.getAlbum(gid) + if album["result"]["items"] == []: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Tidak ada album") + else: + cl.sendText(msg.to,"Dalam album tidak") + else: + if wait["lang"] == "JP": + mg = "Berikut ini adalah album dari target" + else: + mg = "Berikut ini adalah subjek dari album" + for y in album["result"]["items"]: + if "photoCount" in y: + mg += str(y["title"]) + ":" + str(y["photoCount"]) + "\n" + else: + mg += str(y["title"]) + ":0 pieces\n" + elif "Hapus album " in msg.text: + gid = msg.text.replace("Hapus album ","") + albums = cl.getAlbum(gid)["result"]["items"] + i = 0 + if albums != []: + for album in albums: + cl.deleteAlbum(gid,album["gid"]) + i += 1 + if wait["lang"] == "JP": + cl.sendText(msg.to,str(i) + "Soal album telah dihapus") + else: + cl.sendText(msg.to,str(i) + "Hapus kesulitan album🛡") + elif msg.text.lower() == 'group id': + gid = cl.getGroupIdsJoined() + h = "" + for i in gid: + h += "[%s]:%s\n" % (cl.getGroup(i).name,i) + cl.sendText(msg.to,h) + elif msg.text in ["Bot out"]: + gid = cl.getGroupIdsJoined() + gid = ki.getGroupIdsJoined() + gid = ki2.getGroupIdsJoined() + for i in gid: + ki.leaveGroup(i) + ki2.leaveGroup(i) + ki7.leaveGroup(i) + if wait["lang"] == "JP": + cl.sendText(msg.to,"Bot Sudah Keluar Di semua grup") + else: + cl.sendText(msg.to,"He declined all invitations") + elif "Album deleted:" in msg.text: + gid = msg.text.replace("Album deleted:","") + albums = cl.getAlbum(gid)["result"]["items"] + i = 0 + if albums != []: + for album in albums: + cl.deleteAlbum(gid,album["id"]) + i += 1 + if wait["lang"] == "JP": + cl.sendText(msg.to,str(i) + "Soal album telah dihapus👈") + else: + cl.sendText(msg.to,str(i) + "Hapus kesulitan album👈") + elif msg.text in ["Auto add on","Add auto on"]: + if wait["autoAdd"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Already On") + else: + cl.sendText(msg.to,"Already On👈") + else: + wait["autoAdd"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"Already On👈") + else: + cl.sendText(msg.to,"Already On👈") + elif msg.text in ["Auto add off","Add auto off"]: + if wait["autoAdd"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Hal ini sudah off👈") + else: + cl.sendText(msg.to,"Hal ini sudah dimatikan👈") + else: + wait["autoAdd"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Already Off👈") + else: + cl.sendText(msg.to,"Untuk mengaktifkan-off👈") + elif "Message set:" in msg.text: + wait["message"] = msg.text.replace("Message set:","") + cl.sendText(msg.to,"We changed the message👈") + elif "Help set:" in msg.text: + wait["help"] = msg.text.replace("Help set:","") + cl.sendText(msg.to,"We changed the Help👈") + elif "Pesan add-" in msg.text: + wait["message"] = msg.text.replace("Pesan add-","") + if wait["lang"] == "JP": + cl.sendText(msg.to,"Kami mengubah pesan🛡") + else: + cl.sendText(msg.to,"Change information") + elif msg.text in ["Pesan add cek","Message Confirmation"]: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Additional information is automatically set to the following \n\n" + wait["message"]) + else: + cl.sendText(msg.to,"Pesan tambahan otomatis telah ditetapkan sebagai berikut \n\n" + wait["message"]) + elif msg.text in ["Change","change"]: + if wait["lang"] =="JP": + wait["lang"] = "TW" + cl.sendText(msg.to,"I changed the language to engglis👈") + else: + wait["lang"] = "JP" + cl.sendText(msg.to,"I changed the language to indonesia👈") + elif "Message set" in msg.text: + c = msg.text.replace("Message set","") + if c in [""," ","\n",None]: + cl.sendText(msg.to,"Is a string that can not be changed👈") + else: + wait["comment"] = c + cl.sendText(msg.to,"This has been changed👈\n\n" + c) + elif "Come Set:" in msg.text: + c = msg.text.replace("Come Set:","") + if c in [""," ","\n",None]: + cl.sendText(msg.to,"Merupakan string yang tidak bisa diubah👈") + else: + wait["comment"] = c + cl.sendText(msg.to,"Ini telah diubah👈\n\n" + c) + elif msg.text in ["Com on","Com:on","Comment on"]: + if wait["commentOn"] == True: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Aku berada di👈") + else: + cl.sendText(msg.to,"To open👈") + else: + wait["commentOn"] = True + if wait["lang"] == "JP": + cl.sendText(msg.to,"オンにしました👈") + else: + cl.sendText(msg.to,"要了开👈") + elif msg.text in ["Come off"]: + if wait["commentOn"] == False: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Hal ini sudah off") + else: + cl.sendText(msg.to,"It is already turned off") + else: + wait["commentOn"] = False + if wait["lang"] == "JP": + cl.sendText(msg.to,"Off👈") + else: + cl.sendText(msg.to,"To turn off") + elif msg.text in ["Com","Comment"]: + cl.sendText(msg.to,"Auto komentar saat ini telah ditetapkan sebagai berikut:👈\n\n" + str(wait["comment"])) + elif msg.text in ["url","Url"]: + if msg.toType == 2: + g = cl.getGroup(msg.to) + if g.preventJoinByTicket == True: + g.preventJoinByTicket = False + cl.updateGroup(g) + gurl = cl.reissueGroupTicket(msg.to) + cl.sendText(msg.to,"line://ti/g/" + gurl) + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Hal ini tidak dapat digunakan di luar kelompok") + else: + cl.sendText(msg.to,"Tidak dapat digunakan untuk kelompok selain") + elif msg.text in ["Gurl"]: + if msg.toType == 2: + x = cl.getGroup(msg.to) + if x.preventJoinByTicket == True: + x.preventJoinByTicket = False + cl.updateGroup(x) + gurl = cl.reissueGroupTicket(msg.to) + cl.sendText(msg.to,"line://ti/g/" + gurl) + else: + if wait["lang"] == "JP": + cl.sendText(msg.to,"Can't be used outside the group") + else: + cl.sendText(msg.to,"Not for use less than group") + elif "V1 gurl" in msg.text: + if msg.toType == 1: + gid = msg.text.replace("gurl","") + gurl = ki.reissueGroupTicket(tid) + ki.sendText(msg.to,"line://ti/p" + turl) + else: + ki.sendText(msg.to,"error") + + elif "gurl" in msg.text: + if msg.toType == 2: + gid = msg.text.replace("gurl","") + gurl = cl.reissueGroupTicket(gid) + cl.sendText(msg.to,"line://ti/g/" + gurl) + else: + cl.sendText(msg.to,"Tidak dapat digunakan untuk kelompok selain") + elif msg.text in ["Com Bl"]: + wait["wblack"] = True + cl.sendText(msg.to,"Please send contacts from the person you want to add to the blacklistô€œô€…”👈") + elif msg.text in ["Com hapus Bl"]: + wait["dblack"] = True + cl.sendText(msg.to,"Please send contacts from the person you want to add from the blacklistô€œô€…”👈") + elif msg.text in ["Com Bl cek"]: + if wait["commentBlack"] == {}: + cl.sendText(msg.to,"Nothing in the blacklistô€œ🛡") + else: + cl.sendText(msg.to,"The following is a blacklistô€œ👈") + mc = "" + for mi_d in wait["commentBlack"]: + mc += "・" +cl.getContact(mi_d).displayName + "\n" + cl.sendText(msg.to,mc) + elif msg.text.lower() == 'jam on': + if wait["clock"] == True: + cl.sendText(msg.to,"Sudah On") + else: + wait["clock"] = True + now2 = datetime.now() + nowT = datetime.strftime(now2,"(%H:%M)") + profile = cl.getProfile() + profile.displayName = wait["cName"] + nowT + cl.updateProfile(profile) + cl.sendText(msg.to,"👉Jam on👈") + elif msg.text.lower() == 'jam off': + if wait["clock"] == False: + cl.sendText(msg.to,"Hal ini sudah off🛡") + else: + wait["clock"] = False + cl.sendText(msg.to,"Adalah Off") + elif "Jam say:" in msg.text: + n = msg.text.replace("Jam say:","") + if len(n.decode("utf-8")) > 30: + cl.sendText(msg.to,"terlalu lama") + else: + wait["cName"] = n + cl.sendText(msg.to,"Ini telah diubah🛡\n\n" + n) + elif msg.text.lower() == 'update': + if wait["clock"] == True: + now2 = datetime.now() + nowT = datetime.strftime(now2,"(%H:%M)") + profile = cl.getProfile() + profile.displayName = wait["cName"] + nowT + cl.updateProfile(profile) + cl.sendText(msg.to,"Diperbarui👈") + else: + cl.sendText(msg.to,"Silahkan Aktifkan Nama") + + elif "Nk " in msg.text: + nk0 = msg.text.replace("Nk ","") + nk1 = nk0.lstrip() + nk2 = nk1.replace("@","") + nk3 = nk2.rstrip() + _name = nk3 + gs = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + gs.preventJoinByTicket = False + cl.updateGroup(gs) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki3.acceptGroupInvitationByTicket(msg.to,Ticket) + time.sleep(0.2) + targets = [] + for s in gs.members: + if _name in s.displayName: + targets.append(s.mid) + if targets == []: + sendMessage(msg.to,"user does not exist") + pass + else: + for target in targets: + try: + ki3.kickoutFromGroup(msg.to,[target]) + print (msg.to,[g.mid]) + except: + ki3.leaveGroup(msg.to) + gs = cl.getGroup(msg.to) + gs.preventJoinByTicket = True + cl.updateGroup(gs) + gs.preventJoinByTicket(gs) + cl.updateGroup(gs) + + elif msg.text == "Sider": + cl.sendText(msg.to, "hmm..") + try: + del wait2['readPoint'][msg.to] + del wait2['readMember'][msg.to] + except: + pass + now2 = datetime.now() + wait2['readPoint'][msg.to] = msg.id + wait2['readMember'][msg.to] = "" + wait2['ROM'][msg.to] = {} + wait2['setTime'][msg.to] = datetime.today().strftime('%Y-%m-%d %H:%M:%S') + print wait2 + + elif msg.text == "Read": + if msg.to in wait2['readPoint']: + if wait2["ROM"][msg.to].items() == []: + chiya = "" + else: + chiya = "" + for rom in wait2["ROM"][msg.to].items(): + print rom + chiya += rom[1] + "\n" + + cl.sendText(msg.to, "== List Reader Aktif == \n %s\n\nList Reader Pasif\n%s ♪\n\nReading point creation date n time:\n[%s]" % (wait2['readMember'][msg.to],chiya,setTime[msg.to])) + else: + cl.sendText(msg.to, "An already read point has not been set.\n「set」you can send ♪ read point will be created ♪") + +#-----------------------[Add Staff Section]------------------------ + elif "Add staff @" in msg.text: + if msg.from_ in admin: + print "[Command]Staff add executing" + _name = msg.text.replace("Add staff @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + gs = ki.getGroup(msg.to) + gs = ki2.getGroup(msg.to) + gs = ki3.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + cl.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + staff.append(target) + cl.sendText(msg.to,"Added to the staff list") + except: + pass + print "[Command]Staff add executed" + else: + cl.sendText(msg.to,"Command denied.") + cl.sendText(msg.to,"Admin permission required.") + + elif "Add Staff @" in msg.text: + if msg.from_ in admin: + print "[Command]Staff add executing" + _name = msg.text.replace("Add Staff @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + gs = ki.getGroup(msg.to) + gs = ki2.getGroup(msg.to) + gs = ki3.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + cl.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + staff.append(target) + cl.sendText(msg.to,"Added to the staff list") + except: + pass + print "[Command]Staff add executed" + else: + cl.sendText(msg.to,"Command denied.") + cl.sendText(msg.to,"Admin permission required.") + + elif "Remove Staff @" in msg.text: + if msg.from_ in admin: + print "[Command]Staff remove executing" + _name = msg.text.replace("Remove Staff @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + gs = ki.getGroup(msg.to) + gs = ki2.getGroup(msg.to) + gs = ki3.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + cl.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + staff.remove(target) + cl.sendText(msg.to,"Removed to the staff list") + except: + pass + print "[Command]Staff remove executed" + else: + cl.sendText(msg.to,"Command denied.") + cl.sendText(msg.to,"Admin permission required.") + + elif "Remove staff @" in msg.text: + if msg.from_ in admin: + print "[Command]Staff remove executing" + _name = msg.text.replace("Remove staff @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + gs = ki.getGroup(msg.to) + gs = ki2.getGroup(msg.to) + gs = ki3.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + ki.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + staff.remove(target) + cl.sendText(msg.to,"Removed to the staff list") + except: + pass + print "[Command]Staff remove executed" + else: + cl.sendText(msg.to,"Command denied.") + cl.sendText(msg.to,"Admin permission required.") + + elif msg.text in ["Stafflist","stafflist"]: + if staff == []: + cl.sendText(msg.to,"The stafflist is empty") + else: + cl.sendText(msg.to,"Staff list:") + mc = "" + for mi_d in staff: + mc += "=>" +cl.getContact(mi_d).displayName + "\n" + cl.sendText(msg.to,mc) + print "[Command]Stafflist executed" +#----------------------------------------------------------- + + elif ("Bunuh " in msg.text): + targets = [] + key = eval(msg.contentMetadata["MENTION"]) + key["MENTIONEES"][0]["M"] + for x in key["MENTIONEES"]: + targets.append(x["M"]) + for target in targets: + try: + cl.kickoutFromGroup(msg.to,[target]) + except: + cl.sendText(msg.to,"Error") + elif ("Cek " in msg.text): + key = eval(msg.contentMetadata["MENTION"]) + key1 = key["MENTIONEES"][0]["M"] + mi = cl.getContact(key1) + cl.sendText(msg.to,"Mid:" + key1) + + elif "Vk " in msg.text: + nk0 = msg.text.replace("Beb ","") + nk1 = nk0.lstrip() + nk2 = nk1.replace("","") + nk3 = nk2.rstrip() + _name = nk3 + gs = cl.getGroup(msg.to) + targets = [] + for s in gs.members: + if _name in s.displayName: + targets.append(s.mid) + if targets == []: + sendMessage(msg.to,"user does not exist") + pass + else: + for target in targets: + try: + random.choice(KAC).kickoutFromGroup(msg.to,[target]) + print (msg.to,[g.mid]) + except: + cl.sendText(msg.to,"Good Bye") + +#---------------------------------------------------------------- + elif "InviteMeTo: " in msg.text: + if msg.from_ in admin: + gid = msg.text.replace("InviteMeTo: ","") + if gid == "": + cl.sendText(msg.to,"Invalid group id") + else: + try: + ki.findAndAddContactsByMid(msg.from_) + ki.inviteIntoGroup(gid,[msg.from_]) + except: + ki.sendText(msg.to,"Mungkin saya tidak di dalaam grup itu") +#----------------------------------------------------------- + elif "Spam " in msg.text: + txt = msg.text.split(" ") + jmlh = int(txt[2]) + teks = msg.text.replace("Spam "+str(txt[1])+" "+str(jmlh)+" ","") + tulisan = jmlh * (teks+"\n") + #Vicky Kull~ + if txt[1] == "on": + if jmlh <= 100000: + for x in range(jmlh): + cl.sendText(msg.to, teks) + else: + cl.sendText(msg.to, "Out of Range!") + elif txt[1] == "off": + if jmlh <= 100000: + cl.sendText(msg.to, tulisan) + else: + cl.sendText(msg.to, "Out Of Range!") + + elif "Hay @" in msg.text: + _name = msg.text.replace("Hay @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + for g in gs.members: + if _nametarget == g.displayName: + ki.sendText(g.mid,"Your Account Has Been Spammed !") + ki2.sendText(g.mid,"Your Account Has Been Spammed !") + ki3.sendText(g.mid,"Your Account Has Been Spammed !") + ki4.sendText(g.mid,"Your Account Has Been Spammed !") + ki5.sendText(g.mid,"Your Account Has Been Spammed !") + ki6.sendText(g.mid,"Your Account Has Been Spammed !") + ki7.sendText(g.mid,"Your Account Has Been Spammed !") + cl.sendText(msg.to, "Done") + print " Spammed !" + + elif "Hallo " in msg.text: + midd = msg.text.replace("Hallo ","") + gs = cl.getGroup(msg.to) + for g in gs.members: + if _nametarget == g.displayName: + ki.sendText(g.mid,[miid] + "Your Account Has Been Spammed !") + ki2.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + ki3.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + ki4.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + ki5.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + ki6.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + ki7.sendText(g.mid,[midd] + "Your Account Has Been Spammed !") + cl.sendText(msg.to, "Done") + print " Spammed !" +#-----------------------------------------------------------) + elif ("Ban " in msg.text): + if msg.from_ in admin: + key = eval(msg.contentMetadata["MENTION"]) + key["MENTIONEES"][0]["M"] + targets = [] + for x in key["MENTIONEES"]: + targets.append(x["M"]) + for target in targets: + try: + wait["blacklist"][target] = True + f=codecs.open('st2__b.json','w','utf-8') + json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False) + cl.sendText(msg.to,"Succes Bosque") + except: + pass + elif "Unban @" in msg.text: + if msg.toType == 2: + print "[Unban]ok" + _name = msg.text.replace("Unban @","") + _nametarget = _name.rstrip() + gs = cl.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + cl.sendText(msg.to,"Not found") + else: + for target in targets: + try: + del wait["blacklist"][target] + f=codecs.open('st2__b.json','w','utf-8') + json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False) + cl.sendText(msg.to,"Target Unlocked") + except: + cl.sendText(msg.to,"Error") + + elif "Ban:" in msg.text: + nk0 = msg.text.replace("Ban:","") + nk1 = nk0.lstrip() + nk2 = nk1.replace("","") + nk3 = nk2.rstrip() + _name = nk3 + gs = cl.getGroup(msg.to) + targets = [] + for s in gs.members: + if _name in s.displayName: + targets.append(s.mid) + if targets == []: + sendMessage(msg.to,"user does not exist") + pass + else: + for target in targets: + try: + wait["blacklist"][target] = True + f=codecs.open('st2__b.json','w','utf-8') + json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False) + cl.sendText(msg.to,"Target Locked") + except: + kk.sendText(msg.to,"Error") + + elif "Unban:" in msg.text: + nk0 = msg.text.replace("Unban:","") + nk1 = nk0.lstrip() + nk2 = nk1.replace("","") + nk3 = nk2.rstrip() + _name = nk3 + gs = cl.getGroup(msg.to) + targets = [] + for s in gs.members: + if _name in s.displayName: + targets.append(s.mid) + if targets == []: + sendMessage(msg.to,"user does not exist") + pass + else: + for target in targets: + try: + del wait["blacklist"][target] + f=codecs.open('st2__b.json','w','utf-8') + json.dump(wait["blacklist"], f, sort_keys=True, indent=4,ensure_ascii=False) + cl.sendText(msg.to,"Target Unlocked") + except: + kk.sendText(msg.to,"Error") +#----------------------------------------------------------- + + elif "Mycopy @" in msg.text: + if msg.toType == 2: + if msg.from_ in admin: + print "[COPY] Ok" + _name = msg.text.replace("Mycopy @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + cl.sendText(msg.to, "Not Found...") + else: + for target in targets: + try: + cl.cloneContactProfile(target) + cl.sendText(msg.to, "Succes Copy profile") + except Exception as e: + print e + + + elif msg.text in ["Mybackup"]: + try: + cl.updateDisplayPicture(mybackup.pictureStatus) + cl.updateProfile(mybackup) + cl.sendText(msg.to, "backup done") + except Exception as e: + cl.sendText(msg.to, str (e)) + + elif msg.text in ["Backup"]: + try: + ki.updateDisplayPicture(backup.pictureStatus) + ki.updateProfile(backup) + ki2.updateDisplayPicture(backup.pictureStatus) + ki2.updateProfile(backup) + cl.sendText(msg.to, "backup done") + except Exception as e: + cl.sendText(msg.to, str (e)) + +#----------------------------------------------------------- + elif "Mban:" in msg.text: + midd = msg.text.replace("Mban:","") + wait["blacklist"][midd] = True + cl.sendText(msg.to,"Target Lock") +#-----------------------------------------------------<------ + elif "#leave" in msg.text: + try: + import sys + sys.exit() + except: + pass +#----------------------------------------------------------- + + elif msg.text in ["Sp","Speed","speed"]: + start = time.time() + cl.sendText(msg.to, "Progress...") + elapsed_time = time.time() - start + cl.sendText(msg.to, "%sseconds" % (elapsed_time)) + +#----------------------------------------------------------- + elif msg.text.lower() == 'respons': + profile = ki.getProfile() + text = profile.displayName + "􀜁􀅔􏿿" + cl.sendText(msg.to, text) + profile = ki2.getProfile() + text = profile.displayName + "􀜁􀅔􏿿" + ki.sendText(msg.to, text) + profile = ki3.getProfile() + text = profile.displayName + "􀜁􀅔􏿿" + +#------------------------------------------------------------------- + +#------------------------------------------------------------------ + elif "Steal home @" in msg.text: + print "[Command]dp executing" + _name = msg.text.replace("Steal home @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + ki.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + contact = cl.getContact(target) + cu = cl.channel.getCover(target) + path = str(cu) + cl.sendImageWithURL(msg.to, path) + except: + pass + print "[Command]dp executed" +#------------------------------------------------------------------ + elif "Steal dp @" in msg.text: + print "[Command]dp executing" + _name = msg.text.replace("Steal dp @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + targets = [] + for g in gs.members: + if _nametarget == g.displayName: + targets.append(g.mid) + if targets == []: + ki.sendText(msg.to,"Contact not found") + else: + for target in targets: + try: + contact = cl.getContact(target) + path = "http://dl.profile.line-cdn.net/" + contact.pictureStatus + cl.sendImageWithURL(msg.to, path) + except: + pass + print "[Command]dp executed" + #------------------------------------------------------------------ + elif msg.text in ["Gcreator:inv"]: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + gCreator = ginfo.creator.mid + try: + cl.findAndAddContactsByMid(gCreator) + cl.inviteIntoGroup(msg.to,[gCreator]) + print "success inv gCreator" + except: + pass + elif "Mid @" in msg.text: + _name = msg.text.replace("Mid @","") + _nametarget = _name.rstrip(' ') + gs = cl.getGroup(msg.to) + for g in gs.members: + if _nametarget == g.displayName: + cl.sendText(msg.to, g.mid) + else: + pass + elif msg.text in ["Bans:on"]: + wait["wblacklist"] = True + cl.sendText(msg.to,"Send Contact") + elif msg.text in ["Unbans:on"]: + wait["dblacklist"] = True + cl.sendText(msg.to,"Send Contact") + elif msg.text.lower() == 'mcheck': + if wait["blacklist"] == {}: + cl.sendText(msg.to,"􀜁􀇔􏿿 Nothing in the blacklist") + else: + cl.sendText(msg.to,"􀜁􀇔􏿿 following is a blacklist") + mc = "" + for mi_d in wait["blacklist"]: + mc += "➡" +cl.getContact(mi_d).displayName + "\n" + cl.sendText(msg.to,mc) + elif msg.text.lower() == 'banlist': + if msg.toType == 2: + group = cl.getGroup(msg.to) + gMembMids = [contact.mid for contact in group.members] + matched_list = [] + for tag in wait["blacklist"]: + matched_list+=filter(lambda str: str == tag, gMembMids) + cocoa = "" + for mm in matched_list: + cocoa += "➡" +cl.getContact(mm).displayName + "\n" + cl.sendText(msg.to,cocoa + "Daftar Hitam") + elif msg.text.lower() == 'kill': + if msg.toType == 2: + group = ki.getGroup(msg.to) + gMembMids = [contact.mid for contact in group.members] + matched_list = [] + for tag in wait["blacklist"]: + matched_list+=filter(lambda str: str == tag, gMembMids) + if matched_list == []: + ki.sendText(msg.to,"Daftar hitam pengguna tidak memiliki") + return + for jj in matched_list: + try: + cl.kickoutFromGroup(msg.to,[jj]) + ki.kickoutFromGroup(msg.to,[jj]) + ki2.kickoutFromGroup(msg.to,[jj]) + ki3.kickoutFromGroup(msg.to,[jj]) + ki4.kickoutFromGroup(msg.to,[jj]) + ki5.kickoutFromGroup(msg.to,[jj]) + ki6.kickoutFromGroup(msg.to,[jj]) + print (msg.to,[jj]) + except: + pass + elif "Cleanse" in msg.text: + if msg.toType == 2: + print "ok" + _name = msg.text.replace("Cleanse","") + gs = ki.getGroup(msg.to) + gs = ki2.getGroup(msg.to) + gs = ki3.getGroup(msg.to) + gs = ki4.getGroup(msg.to) + gs = ki5.getGroup(msg.to) + gs = ki6.getGroup(msg.to) + gs = ki7.getGroup(msg.to) + ki.sendText(msg.to,"Just some casual cleansing ") + ki2.sendText(msg.to,"Group cleansed.") + ki3.sendText(msg.to,"Bye All") + targets = [] + for g in gs.members: + if _name in g.displayName: + targets.append(g.mid) + if targets == []: + ki.sendText(msg.to,"Not found.") + ki2.sendText(msg.to,"Not found.") + else: + for target in targets: + if not target in Bots: + try: + klist=[ki4,ki5,ki6,ki7] + kicker=random.choice(klist) + kicker.kickoutFromGroup(msg.to,[target]) + print (msg.to,[g.mid]) + except: + ki.sendText(msg,to,"Group cleanse") + ki2.sendText(msg,to,"Group cleanse") + elif msg.text.lower() == 'cancel': + if msg.toType == 2: + group = cl.getGroup(msg.to) + gMembMids = [contact.mid for contact in group.invitee] + for _mid in gMembMids: + cl.cancelGroupInvitation(msg.to,[_mid]) + cl.sendText(msg.to,"I pretended to cancel and canceled👈") + + elif msg.text in ["Mangat","B"]: + if msg.toType == 2: + group = cl.getGroup(msg.to) + gMembMids = [contact.mid for contact in group.invitee] + for _mid in gMembMids: + cl.cancelGroupInvitation(msg.to,[_mid]) + cl.sendText(msg.to,"B") + cl.sendText(msg.to,"B") + cl.sendText(msg.to,"B") + elif "Album" in msg.text: + try: + albumtags = msg.text.replace("Album","") + gid = albumtags[:33] + name = albumtags.replace(albumtags[:34],"") + cl.createAlbum(gid,name) + cl.sendText(msg.to,name + "We created an album👈") + except: + cl.sendText(msg.to,"Error") + + elif "fakec→" in msg.text: + try: + source_str = 'abcdefghijklmnopqrstuvwxyz1234567890@:;./_][!&%$#)(=~^|' + name = "".join([random.choice(source_str) for x in xrange(10)]) + amid = msg.text.replace("fakec→","") + cl.sendText(msg.to,str(cl.channel.createAlbumF(msg.to,name,amid))) + except Exception as e: + try: + cl.sendText(msg.to,str(e)) + except: + pass + +#----------------------------------------------- + +#----------------------------------------------- + elif msg.text.lower() == ["Masuk"]: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki.acceptGroupInvitationByTicket(msg.to,Ticket) + time.sleep(0.01) + ki2.acceptGroupInvitationByTicket(msg.to,Ticket) + time.sleep(0.01) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + random.choice(KAC).updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + random.choice(KAC).updateGroup(G) + +#----------------------------------------------- + elif msg.text in ["Masuk","Kuy"]: + if msg.from_ in admsa: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki.acceptGroupInvitationByTicket(msg.to,Ticket) + time.sleep(0.2) + ki2.acceptGroupInvitationByTicket(msg.to,Ticket) + time.sleep(0.2), + G = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki.updateGroup(G) + + elif msg.text.lower() == 'Sp come': + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki.acceptGroupInvitationByTicket(msg.to,Ticket) + ki2.acceptGroupInvitationByTicket(msg.to,Ticket) + ki3.acceptGroupInvitationByTicket(msg.to,Ticket) + ki4.acceptGroupInvitationByTicket(msg.to,Ticket) + ki5.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki.updateGroup(G) +#----------------------------------------------- + elif "Punk1 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki.updateGroup(G) +#----------------------------------------------- + elif "Punk2 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki2.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki2.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki2.updateGroup(G) +#----------------------------------------------- + elif "Punk3 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki3.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki2.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki2.updateGroup(G) +#----------------------------------------------- + elif "Punk4 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki4.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki3.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki3.updateGroup(G) +#----------------------------------------------- + elif "Punk5 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki5.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki5.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki5.updateGroup(G) +#----------------------------------------------- + elif "Punk6 in" in msg.text: + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = False + cl.updateGroup(G) + invsend = 0 + Ticket = cl.reissueGroupTicket(msg.to) + ki6.acceptGroupInvitationByTicket(msg.to,Ticket) + G = cl.getGroup(msg.to) + ginfo = cl.getGroup(msg.to) + G.preventJoinByTicket = True + ki6.updateGroup(G) + print "kicker ok" + G.preventJoinByTicket(G) + ki6.updateGroup(G) +#----------------------------------------------- + elif msg.text in ["Papay"]: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + cl.sendText(msg.to,"Bye Bye😘 " + str(ginfo.name) + "") + ki.leaveGroup(msg.to) + ki2.leaveGroup(msg.to) + ki3.leaveGroup(msg.to) + ki4.leaveGroup(msg.to) + ki5.leaveGroup(msg.to) + ki6.leaveGroup(msg.to) + ki7.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Pb1 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Pb2 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki2.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Pb3 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki3.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Kb4 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki4.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Kb5 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki5.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Kb6 bye" in msg.text: + if msg.toType == 2: + ginfo = cl.getGroup(msg.to) + try: + ki6.leaveGroup(msg.to) + except: + pass +#----------------------------------------------- + elif "Punk Key" in msg.text: + ki.sendText(msg.to,""" 􀜁􀇔􏿿􀜁􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁􀇔􏿿 \n\n􀜁􀇔􏿿[Punk1 in]\n􀜁􀇔􏿿[1Punkname:]\n􀜁􀇔􏿿[B Cancel]\n􀜁􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk1 Gift]\n􀜁􀇔􏿿[Kb1 bye]\n\n + + + +Street Punk Bot +""") + ki2.sendText(msg.to,""" 􀜁􀇔􏿿􀜁􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁􀇔􏿿 \n\n􀜁􀇔􏿿[Punk2 in]\n􀜁􀇔􏿿[2Punkname:]\n􀜁􀇔􏿿[B Cancel]\n􀜁􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk2 Gift]\n􀜁􀇔􏿿[Kb2 bye]\n\n + + +Street Punk Bot +""") + ki3.sendText(msg.to,""" 􀜁􀇔􏿿��􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁􀇔􏿿 \n\n􀜁􀇔􏿿[Punk3 in]\n􀜁􀇔􏿿[3Punkname:]\n􀜁􀇔􏿿[B Cancel]\n􀜁􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk3 Gift]\n􀜁􀇔􏿿[Kb3 bye]\n\n + + +Street Punk Bot +""") + ki4.sendText(msg.to,""" 􀜁􀇔􏿿􀜁􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁􀇔􏿿 \n\n􀜁􀇔􏿿[Punk4 in]\n􀜁􀇔􏿿[4Punkname:]\n􀜁􀇔������[B Cancel]\n����􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk4 Gift]\n􀜁􀇔􏿿[Kb4 bye]\n\n + + +Street Punk Bot +""") + ki5.sendText(msg.to,""" 􀜁􀇔􏿿􀜁􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁����􏿿 \n\n􀜁􀇔����[Punk5 in]\n􀜁􀇔􏿿[5Punkname:]\n􀜁􀇔􏿿[B Cancel]\n􀜁􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk5 Gift]\n􀜁􀇔􏿿[Kb5 bye]\n\n + + +Street Punk Bot +""") + ki6.sendText(msg.to,""" 􀜁􀇔􏿿􀜁􀇔􏿿 Street Punk 􀜁􀇔􏿿􀜁􀇔􏿿 \n\n 􀜁􀇔􏿿 key Only Kicker 􀜁􀇔􏿿 \n\n􀜁􀇔􏿿[Punk6 in]\n􀜁􀇔􏿿[6Punkname:]\n􀜁􀇔􏿿[B Cancel]\n􀜁􀇔􏿿[kick @]\n􀜁􀇔􏿿[Ban @]\n􀜁􀇔􏿿[kill]\n􀜁􀇔􏿿[BotChat]\n􀜁􀇔􏿿[Respons]\n􀜁􀇔􏿿[Punk6 Gift]\n􀜁􀇔􏿿[Kb6 bye]\n\n + g + +Street Punk Bot +""") +#----------------------------------------------- + elif msg.text in ["Welcome","wc","welcome","Wc"]: + ginfo = cl.getGroup(msg.to) + cl.sendText(msg.to,"Selamat Datang Di Grup " + str(ginfo.name)) + cl.sendText(msg.to,"Owner Grup " + str(ginfo.name) + " :\n" + ginfo.creator.displayName ) + elif "Sayang say " in msg.text: + bctxt = msg.text.replace("Sayang say ","") + ki2.sendText(msg.to,(bctxt)) + elif "say" in msg.text: + if msg.from_ in admin: + bctxt = msg.text.replace("Bc ","") + ki.sendText(msg.to,(bctxt)) + ki2.sendText(msg.to,(bctxt)) + ki3.sendText(msg.to,(bctxt)) + ki4.sendText(msg.to,(bctxt)) + ki5.sendText(msg.to,(bctxt)) + ki6.sendText(msg.to,(bctxt)) + ki7.sendText(msg.to,(bctxt)) + elif msg.text.lower() == 'ping': + ki.sendText(msg.to,"Ping 􀜁􀇔􏿿") + ki2.sendText(msg.to,"Ping 􀜁􀇔􏿿") + ki3.sendText(msg.to,"Ping 􀜁􀇔􏿿") + ki4.sendText(msg.to,"Ping 􀜁􀇔􏿿") + ki5.sendText(msg.to,"Ping 􀜁􀇔􏿿") + ki6.sendText(msg.to,"Ping 􀜁􀇔􏿿") +#----------------------------------------------- +#----------------------------------------------- + if op.type == 19: + try: + if op.param3 in mid: + if op.param2 in kimid: + G = ki.getGroup(op.param1) + G.preventJoinByTicket = False + ki.updateGroup(G) + Ticket = ki.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + cl.updateGroup(G) + else: + G = ki.getGroup(op.param1) + + + + + ki.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki.updateGroup(G) + Ticket = ki.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + cl.updateGroup(G) + ki.updateGroup(G) + wait["blacklist"][op.param2] = True + + + + elif op.param3 in kimid: + if op.param2 in ki2mid: + G = ki2.getGroup(op.param1) + G.preventJoinByTicket = False + ki2.updateGroup(G) + Ticket = ki2.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki2.updateGroup(G) + else: + G = ki2.getGroup(op.param1) + + ki2.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki2.updateGroup(G) + Ticket = ki2.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki.updateGroup(G) + + + elif op.param3 in ki3mid: + if op.param2 in ki2mid: + G = ki2.getGroup(op.param1) + G.preventJoinByTicket = False + ki2.updateGroup(G) + Ticket = ki2.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki2.updateGroup(G) + else: + G = cl.getGroup(op.param1) + + + ki2.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki2.updateGroup(G) + Ticket = ki2.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki2.updateGroup(G) + + elif op.param3 in ki2mid: + if op.param2 in ki3mid: + G = ki3.getGroup(op.param1) + G.preventJoinByTicket = False + ki3.updateGroup(G) + Ticket = ki3.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki3.updateGroup(G) + else: + G = cl.getGroup(op.param1) + + + ki3.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki3.updateGroup(G) + Ticket = ki3.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki3.updateGroup(G) + + elif op.param3 in ki4mid: + if op.param2 in ki5mid: + G = ki5.getGroup(op.param1) + G.preventJoinByTicket = False + ki5.updateGroup(G) + Ticket = ki5.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + cl.updateGroup(G) + else: + G = ki5.getGroup(op.param1) + + + ki5.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki5.updateGroup(G) + Ticket = ki5.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki5.updateGroup(G) + + elif op.param3 in ki5mid: + if op.param2 in ki4mid: + G = ki4.getGroup(op.param1) + G.preventJoinByTicket = False + ki4.updateGroup(G) + Ticket = ki4.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki4.updateGroup(G) + else: + G = ki4.getGroup(op.param1) + + + ki4.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki4.updateGroup(G) + Ticket = ki4.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki4.updateGroup(G) + + elif op.param3 in ki6mid: + if op.param2 in ki5mid: + G = ki5.getGroup(op.param1) + G.preventJoinByTicket = False + ki5.updateGroup(G) + Ticket = ki5.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki5.updateGroup(G) + else: + G = ki5.getGroup(op.param1) + + + ki5.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki5.updateGroup(G) + Ticket = ki5.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki5.updateGroup(G) + + elif op.param3 in ki7mid: + if op.param2 in ki6mid: + G = ki6.getGroup(op.param1) + G.preventJoinByTicket = False + ki6.updateGroup(G) + Ticket = ki6.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + ki7.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki6.updateGroup(G) + else: + G = ki6.getGroup(op.param1) + + + ki6.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki6.updateGroup(G) + Ticket = ki6.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + ki7.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki6.updateGroup(G) + + elif op.param3 in ki8mid: + if op.param2 in ki7mid: + G = ki7.getGroup(op.param1) + G.preventJoinByTicket = False + ki7.updateGroup(G) + Ticket = ki7.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + ki7.acceptGroupInvitationByTicket(op.param1,Ticket) + ki8.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki7.updateGroup(G) + else: + G = ki7.getGroup(op.param1) + + + ki7.kickoutFromGroup(op.param1,[op.param2]) + + G.preventJoinByTicket = False + ki7.updateGroup(G) + Ticket = ki7.reissueGroupTicket(op.param1) + cl.acceptGroupInvitationByTicket(op.param1,Ticket) + ki.acceptGroupInvitationByTicket(op.param1,Ticket) + ki2.acceptGroupInvitationByTicket(op.param1,Ticket) + ki3.acceptGroupInvitationByTicket(op.param1,Ticket) + ki4.acceptGroupInvitationByTicket(op.param1,Ticket) + ki5.acceptGroupInvitationByTicket(op.param1,Ticket) + ki6.acceptGroupInvitationByTicket(op.param1,Ticket) + ki7.acceptGroupInvitationByTicket(op.param1,Ticket) + ki8.acceptGroupInvitationByTicket(op.param1,Ticket) + G.preventJoinByTicket = True + ki7.updateGroup(G) + except: + pass + + if op.type == 17: + if op.param2 not in Bots: + if op.param2 in Bots: + pass + if wait["protect"] == True: + if wait["blacklist"][op.param2] == True: + try: + random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + G = random.choice(KAC).getGroup(op.param1) + G.preventJoinByTicket = True + ki4.updateGroup(G) +# random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + except: +# pass + try: + random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + G = random.choice(KAC).getGroup(op.param1) + G.preventJoinByTicket = True + random.choice(KAC).updateGroup(G) +# random.choice(KAK).kickoutFromGroup(op.param1,[op.param2]) + except: + pass + elif op.param2 not in admin + Bots: + random.choice(KAC).sendText(op.param1,"Welcome. Don't Play Bots. I can kick you!") + else: + pass + if op.type == 19: + if op.param2 not in Bots: + if op.param2 in Bots: + pass + elif wait["protect"] == True: + wait ["blacklist"][op.param2] = True + random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + else: + cl.sendText(op.param1,"") + else: + cl.sendText(op.param1,"") + if op.type == 13: + if op.param2 not in Bots: + if op.param2 in Bots: + pass + elif wait["inviteprotect"] == True: + wait ["blacklist"][op.param2] = True + random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + else: + cl.sendText(op.param1,"") + else: + cl.sendText(op.param1,"") + if op.param2 not in Bots: + if op.param2 in Bots: + pass + elif wait["inviteprotect"] == True: + wait ["blacklist"][op.param2] = True + cl.cancelGroupInvitation(op.param1,[op.param3]) + else: + cl.sendText(op.param1,"") + else: + cl.sendText(op.param1,"") + if op.param2 not in Bots: + if op.param2 in Bots: + pass + elif wait["cancelprotect"] == True: + wait ["blacklist"][op.param2] = True + cl.cancelGroupInvitation(op.param1,[op.param3]) + else: + cl.sendText(op.param1,"") + else: + cl.sendText(op.param1,"") + if op.type == 11: + if op.param2 not in Bots: + if op.param2 in Bots: + pass + elif wait["linkprotect"] == True: + wait ["blacklist"][op.param2] = True + G = ki.getGroup(op.param1) + G.preventJoinByTicket = True + ki.updateGroup(G) + random.choice(KAC).kickoutFromGroup(op.param1,[op.param2]) + else: + cl.sendText(op.param1,"") + else: + cl.sendText(op.param1,"") + if op.type == 5: + if wait["autoAdd"] == True: + if (wait["message"] in [""," ","\n",None]): + pass + else: + cl.sendText(op.param1,str(wait["message"])) +#------------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------------ + if op.type == 55: + print "[NOTIFIED_READ_MESSAGE]" + try: + if op.param1 in wait2['readPoint']: + Nama = cl.getContact(op.param2).displayName + if Nama in wait2['readMember'][op.param1]: + pass + else: + wait2['readMember'][op.param1] += "\n-> " + Nama + wait2['ROM'][op.param1][op.param2] = "-> " + Nama + wait2['setTime'][msg.to] = datetime.today().strftime('%Y-%m-%d %H:%M:%S') + else: + cl.sendText + except: + pass + + if op.type == 59: + print op + + + except Exception as error: + print error + + +def a2(): + now2 = datetime.now() + nowT = datetime.strftime(now2,"%M") + if nowT[14:] in ["10","20","30","40","50","00"]: + return False + else: + return True +def nameUpdate(): + while True: + try: + #while a2(): + #pass + if wait["clock"] == True: + now2 = datetime.now() + nowT = datetime.strftime(now2,"(%H:%M)") + profile = cl.getProfile() + profile.displayName = wait["cName"] + nowT + cl.updateProfile(profile) + time.sleep(600) + except: + pass +thread2 = threading.Thread(target=nameUpdate) +thread2.daemon = True +thread2.start() + +def autolike(): + for zx in range(0,50): + hasil = cl.activity(limit=1000) + if hasil['result']['posts'][zx]['postInfo']['liked'] == False: + try: + cl.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + cl.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki2.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki2.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki3.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki3.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki4.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki4.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki5.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki5.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + ki6.like(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],likeType=1002) + ki6.comment(hasil['result']['posts'][zx]['userInfo']['mid'],hasil['result']['posts'][zx]['postInfo']['postId'],"Auto Like by RikiStreetPunk https://line.me/ti/~deadscreamer") + print "Like" + print "Like" + print "Like" + except: + pass + else: + print "Already Liked" + time.sleep(600) +thread2 = threading.Thread(target=autolike) +thread2.daemon = True +thread2.start() + +while True: + try: + Ops = cl.fetchOps(cl.Poll.rev, 5) + except EOFError: + raise Exception("It might be wrong revision\n" + str(cl.Poll.rev)) + + for Op in Ops: + if (Op.type != OpType.END_OF_OPERATION): + cl.Poll.rev = max(cl.Poll.rev, Op.revision) + bot(Op)