def mention(to, nama): aa = "" bb = "" strt = int(12) akh = int(12) nm = nama print nm for mm in nama: akh = akh + 2 aa += """{"S":""" + json.dumps(str(strt)) + ""","E":""" + json.dumps( str(akh)) + ""","M":""" + json.dumps(mm) + "}," "" strt = strt + 6 akh = akh + 4 bb += "\xe2\x98\xbb @x \n" aa = (aa[:int(len(aa) - 1)]) msg = Message() msg.to = to msg.from_ = profile.mid msg.text = "[MENTION]\n" + bb msg.contentMetadata = { 'MENTION': '{"MENTIONEES":[' + aa + ']}', 'EMTVER': '4' } print msg try: client.sendMessage(msg) except Exception as error: print error
def sendContactK(to, mid): mes = Message() mes.to, mes.from_ = to, profile.mid mes.text = None mes.contentType = 13 mes.contentMetadata = {'mid':mid} hiei._client.sendMessage(0, mes)
def sendMessage(to, text, contentMetadata={}, contentType=0): mes = Message() mes.to, mes.from_ = to, profile.mid mes.text = text mes.contentType, mes.contentMetadata = contentType, contentMetadata kongou._client.sendMessage(0, mes)
def sendMessage(to, text, contentMetadata={}, contentType=0): mes = Message() mes.to, mes.from_ = to, profile.mid mes.text = text mes.contentType, mes.contentMetadata = contentType, contentMetadata if to not in messageReq: messageReq[to] = -1 messageReq[to] += 1 client._client.sendMessage(messageReq[to], mes)
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "-\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "sorry") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "time": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime('%Y- %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == ",": sendMessage(msg.to, ".") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "sider sur": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "Yang meread :%s\n\nYang meread tapi kada cungul/stiker wara :\n%s\nBy : suryarchmn\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage(msg.to, "ketik , dulu gasan menandai sider") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 16: msg.text = "post URL\n" + msg.contentMetadata["postEndUrl"] sendMessage(msg.to, msg.text) if msg.contentType == 13: sendMessage(msg.to, "你的Line用戶識別碼:" + msg.contentMetadata["mid"]) contact = client.getContact(msg.contentMetadata["mid"]) try: cu = client.channel.getCover(msg.contentMetadata["mid"]) except: cu = "" sendMessage( msg.to, "[名稱]:\n" + contact.displayName + "\n[mid]:\n" + msg.contentMetadata["mid"] + "\n[個性簽名]:\n" + contact.statusMessage + "\n[頭貼網址]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[主頁照片網址]:\n" + str(cu)) if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "Ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[群組名子]\n" + group.name + "\n\n[gid]\n" + group.id + "\n[群組作者]\n" + gCreator + "\n\n[群組頭像]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "http://line.me/R/ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "開放中喔(*´・ω・*)") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "已開啟網址") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "關閉中喔(*´・ω・*)") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "已關閉網址") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " 掰掰囉") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " 掰掰囉") else: sendMessage(msg.to, "wtf?") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "咦? 沒有人被邀請") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, "已取消了" + str(len(group.invitee)) + "人") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "Time": sendMessage( msg.to, "台灣標準時刻:" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Point": sendMessage(msg.to, "開始紀錄已讀不回♪\n小心喔 已讀不回者♪") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Read": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "抓到了(*′△`)\n看到訊息者 %s\n--------------------\n\n已讀不回者\n%s\n此訊息偵測時間:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "An already read point has not been set.\n「Point」you can send ♪ read point will be created ♪" ) if msg.text == "Sp": start = time.time() sendMessage(msg.to, "NyaPass~ 喵PASS~(*′△`)ノ 檢查中...") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) if msg.text == "Cleanse": print "ok" _name = msg.text.replace("Cleanse", "") gs = client.getGroup(msg.to) sendMessage( msg.to, "Kick By 屁孩大聯盟專業翻群\nsaya a beat Touhou Gensoukyou grup and rata karena bot ini, 東方Project,Touhou Project,Project Shrine Maiden\nNyaPass" ) targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") if msg.text == "Tagall": group = client.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(5) cb += """{"S":""" + json.dumps( str(strt)) + ""","E":""" + json.dumps( str(akh)) + ""","M":""" + json.dumps(md) + "}," "" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"sorry") if "nk: " in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye Sayank..") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "intip": sendMessage(msg.to, "Cek tukang ngintip") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "ciduk": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Dibaca oleh %s\nthat's it\n\nTukang ngintip\n%sMoga panuan\nKurapan\nKudisan\nAminn.....\n\nTercatat date n time:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Ketik dulu Bos .\n「intip」Baru ciduk Dasar pikun...😆😆") else: pass #-------------------------------------------------------------- if msg.text == "Lari": print "ok" _name = msg.text.replace("Lari","") gs = client.getGroup(msg.to) sendMessage(msg.to,"Kick By TWOPAY BOT\nSory group loe nyampah harus di basmi\nTerimakasih") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"error") else: for target in targets: try: klist=[client] kicker=random.choice(klist) kicker.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendText(msg.to,"error") #------------------------------------------------------------- if msg.text == "cek": start = time.time() sendMessage(msg.to, "Loading.........") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) #------------------------------------------------------------- if msg.text == "Sepi": sendMessage(msg.to,"No Baper") sendMessage(msg.to,"No Rusuh") sendMessage(msg.to,"No Ngeyel") sendMessage(msg.to,"No Bulshit") sendMessage(msg.to,"No Byk Alasan") sendMessage(msg.to,"No Nakal") sendMessage(msg.to,"Keep Enjoy") sendMessage(msg.to,"Just Happy") sendMessage(msg.to,"Sekedar Hiburan Jgn Dimasukin Hati") sendMessage(msg.to,"Jaga Kekompakan") sendMessage(msg.to,"Jaga Solideritas Teman") sendMessage(msg.to,"“Menghargai” itu Sifat paling hebat!") sendMessage(msg.to,"Ekpresikanlah Kreatifitasmu") sendMessage(msg.to,"Jadi Org Jujurlah dari sekarang juga, Jujur pada Porsinya") sendMessage(msg.to,"Selesai.............") sendMessage(msg.to,"Created By : Mr 2pay") sendMessage(msg.to,"Don't panix, just relax, it's ok wae ya... wasyik!!!!!!") #------------------------------------------------------------- #-------------Fungsi Tag All Start---------------# if msg.text in ["Hadir","Anu","."]: group = client.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: client.sendMessage(msg) except Exception as error: print error #-------------Fungsi Tag All Finish---------------# else: pass except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "กลุ่ม": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "เปิดเชิญ": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "เปิดลิ้ง": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "คุณได้เปิดลิ้งกลุ่ม * *") if msg.text == "ปิดลิ้ง": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "คุณได้ปิดลิ้งกลุ่ม * * ") if "เตะ:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "ฉันขอโทษ**") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "ยก": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "ไม่มีสมชิดไห้ยกเลิก* *\n") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + " คน..\n ได้ทำการยกเลิก* *") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "คท": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "โช:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "เวลา": sendMessage( msg.to, "ขณะนี้เวลา" + datetime.datetime.today().strftime( 'ปี%Yเดือน%mวัน%d %H:%M:%S') + "") if msg.text == "ของขวัญ": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "ใครแอบ": sendMessage(msg.to, "กรุณาใช้คำสั่ง ♪\n「ใครอ่าน」\nต่อด้วยคับ ♪") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "ใครอ่าน": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "จำนานสมาชิก %s\n\n\nสมาชิกที่อ่าน\n%sสมาชิกที่อ่าน ♪\n\nเวลาที่เข้ามาอ่าน:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "คุณยังไม่ได้ใช้คำสั่ง.\n「ใครแอบ」\nกรุณาใช้ด้วยคับ ♪" ) else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: #----------------------------------------------------------------------------------------------------------------------------------- if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[Nama Grup : ]\n" + group.name + "\n\n[Id Grup : ]\n" + group.id + "\n\n[Pembuat Grup :]\n" + gCreator + "\n\n[Gambar Grup : ]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nKode Url : Diizinkan" else: md += "\n\nKode Url : Diblokir" if group.invitee is None: md += "\nJumlah Member : " + str( len(group.members) ) + "\n\nUndangan Yang Belum Diterima : 0 Orang" else: md += "\nJumlah Member : " + str( len(group.members) ) + " Orang" + "\nUndangan Yang Belum Diterima : " + str( len(group.invitee)) + " Orang" sendMessage(msg.to, md) if "help" in msg.text: sendMessage( msg.to, "「Łɨɲƹ ȡƹ˅ƹŁǿρƹřȿ þǿƮȿ」\n------------------------------\n【βåɱžķÿ β¤țž】\nHelp Command:\n[seţ]\n[siďer]\n[ʍe]\n[ʍid]\n[ǥid]\n[ǥinfo]\n[ţime]\n[þuka]\n[ţutup]\n[µrl]\n[ǥift]\n[ȿpeed]\n[μp]\n[ţagall]\n[ȼancel]\n[Ğn 「Nama」]\n[ɨnvite:「By Mid」]\n[ȿhow:「By Mid」\n[яename:「Ganti Nama Profil」]\n\nHelp Command 「Kicker Only」:\n[ɲk「By Tag」]\n[мulai]\n[µni]\n\nBased on : Vodka\nLink : http://github.com/merkremont/LineVodka\nSupport By : Line Developers\nModding By : Bamzky\nVersion Mod : 2.0.3beta\n\n【βåɱžķÿ β¤țž】\n------------------------------\n「Łɨɲƹ ȡƹ˅ƹŁǿρƹřȿ þǿƮȿ」" ) if "Gn " in msg.text: if msg.toType == 2: X = client.getGroup(msg.to) X.name = msg.text.replace("Gn ", "") client.updateGroup(X) sendMessage( msg.to, "Udah diganti tuh nama grupnya Har Har") else: client.sendMessage( msg.to, "Gabisa digunain digrup Har Har") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "uni": sendMessage( msg.to, "Hai Perkenalkan.....\nNama saya teh saha ya?\n\n1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1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.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1\n\nMakasih Sudah Dilihat :)\nJangan Dikick ampun mzz :v" ) if msg.text == "up": sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "up") sendMessage(msg.to, "Udah ah spamnya nanti dimarahin Har Har") if msg.text == "buka": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Sudah dibuka mzque :v") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL dibuka") sendMessage(msg.to, "Link Grup : ") sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "tutup": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Sudah ditutup mzque :v") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL ditutup") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") if "nk" in msg.text: bamz0 = msg.text.replace("nk ", "") bamz1 = bamz0.lstrip() bamz2 = bamz1.replace("@", "") bamz3 = bamz2.rstrip() _linedev = bamz3 group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if _linedev in Names: kazu = Names.index(_linedev) sendMessage(msg.to, "Dada! Jan kangen njir :v") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") else: sendMessage(msg.to, "salah goblog Har Har") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage( op.message.to, "Kagak ada yang diinv anjir Har Har apaan yang mau dicancel coba Har Har" ) else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + " Yang udah dicancel yak") if "mid @" in msg.text: _name = msg.text.replace("mid @", "") _nametarget = _name.rstrip(' ') group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if _nametarget in Names: Mids = Names.index(_nametarget) contact = client.getContact(Mids[Mids]) client.sendMessage(msg.to, Mids[Mids]) else: pass if "rename:" in msg.text: string = msg.text.replace("rename:", "") if len(string.decode('utf-8')) <= 20: profile_B = client.getProfile() profile_B.displayName = string client.updateProfile(profile_B) client.sendMessage(msg.to, "name " + string + " done") sendMessage( mgs.to, "Udah diganti namanya, coba cek Har Har") if msg.text == "Mulai": print "Cleaning Member....." _name = msg.text.replace("Mulai", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Hi, B-I-T-C-H") sendMessage(msg.to, "Just f*****g cleaning member") sendMessage(msg.to, "Jadi gausah bacot anjing") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendMessage(msg.to, "Grup Dibersihkan") if "info @" in msg.text: if msg.contentType == 0: _name = msg.text.replace("info @", "") _nametarget = _name.rstrip(' ') gs = client.getGroup(msg.to) client.sendMessage(msg.to, msg.contentMetadata["mid"]) for g in gs.members: if _nametarget == g.displayName: if 'displayName' in msg.contentMetadata: contact = client.getContact( msg.contentMetadata["mid"]) try: contact = client.channel.getCover( msg.contentMetadata["mid"]) except: contact = "" client.sendMessage( msg.to, "[Nama Profil]:\n" + msg.contentMetadata["displayName"] + "\n[Id Profil]:\n" + msg.contentMetadata["mid"] + "\n[Bio]:\n" + contact.statusMessage + "\n[Foto Profil]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[Header Profil]:\n" + str(contact)) else: contact = client.getContact( msg.contentMetadata["mid"]) try: contact = client.channel.getCover( msg.contentMetadata["mid"]) except: contact = "" client.sendMessage( msg.to, "[Nama Profil]:\n" + contact.displayName + "\n[Id Profil]:\n" + msg.contentMetadata["mid"] + "\n[Bio]:\n" + contact.statusMessage + "\n[Foto Profil]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[Header Profil]:\n" + str(contact)) else: pass if msg.text == "speed": start = time.time() sendMessage(msg.to, "Processing...") elapsed_time = time.time() - start sendMessage(msg.to, "%s Detik" % (elapsed_time)) if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " Gua inv lu yak :v") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "Kontaknya si " + contact.displayName + "") if msg.text == "tagall": group = client.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(5) cb += """{"S":""" + json.dumps( str(strt)) + ""","E":""" + json.dumps(str( akh)) + ""","M":""" + json.dumps(md) + "}," "" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error if msg.text == "time": sendMessage( msg.to, "Tanggal sekarang = " + datetime.datetime.today().strftime('%d-%m-%y')) sendMessage( msg.to, "Waktu sekarang = " + datetime.datetime.today().strftime('%H:%M:%S')) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage( msg.to, "Dasar sider lucknut :v \nKetik 「sider」 gua bakal ngasih tau siapa sidernya" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%d-%m-%y %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "sider": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "Nih sider lucknut %s\nTadaaaa.....\n\nYang sider doang kerjaannya\n%sGileee benerrr..\n\nSider dilihat pada tanggal dan waktu:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "Belom di set dodol Har Har\nKetik 「set」 buat lihat siapa sider lucknut :v" ) else: pass else: pass #----------------------------------------------------------------------------------------------------------------------------------- except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "Mymid": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "Ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "Gn:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Changed to") if msg.text == "Gurl": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Ourl": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Already open, Senpai ≧∀≦") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "Done".) if msg.text == "Curl": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Already close,Senpai ≧∀≦") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "Done Senpai ≧∀≦.") if "Kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"Sorry Senpai ≧∀≦") if "Nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Sorry Senpai ≧∀≦") else: sendMessage(msg.to, "wtf?") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting,Senpai ≧∀≦.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done Senpai ≧∀≦") if "Invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you Senpai ≧∀≦") if msg.text == "Author": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "Show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if ('Leave' == msg.lower()) and (sender == 'u6dc040137eac599ca446f80f45bbd93c'): client._client.leaveGroup(0, receiver) if 'Say' in msg.lower(): try: client._sendMessage(Message(to=receiver, text=(str(h[9:]).encode("utf-8")))) except Exception, e: print e if 'Owner' == msg.lower(): client._client.sendMessage(0, Message(to=receiver, contentType=13, contentMetadata={'displayName':'','mid':'u6dc040137eac599ca446f80f45bbd93c'})) if msg.text == "dho time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Set": sendMessage(msg.to, "Hello,Senpai Jangan Sider pls ≧∀≦ :)") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "tes": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Sider %s\nthat's it\n\nSiders\n%sPlease leave the group ♪\n\nSider Point:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Hello :)") else: pass else:
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 2: if msg.contentType == 0: #if "gname:" in msg.text: #-------------------------------------------------------------- if msg.text == "Mulai": print "ok" _name = msg.text.replace("Mulai", "") gs = client.getGroup(msg.to) sendMessage( msg.to, "Created by: T-K!\n\nSpecial Thanks for:\n - yel\n - Farzain" ) targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") #------------------------------------------------------------- if msg.text == "Salken all": start = time.time() sendMessage(msg.to, "hehehe") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) #------------------------------------------------------------- if msg.text == "Spam": printf("\n\nSPAMING_STARTED\n\n") sendMessage(msg.to, "3") sendMessage(msg.to, "2") sendMessage(msg.to, "1") sendMessage(msg.to, "F**k Off") sendMessage(msg.to, "Ku mengejar bus yang mulai berjalan") sendMessage(msg.to, "Ku ingin ungkapkan kepada dirimu") sendMessage(msg.to, "Kabut dalam hatiku telah menghilang") sendMessage(msg.to, "Dan hal yang penting bagiku pun terlihat") sendMessage( msg.to, "Walaupun jawaban itu sebenarnya begitu mudah") sendMessage(msg.to, "Tetapi entah mengapa diriku melewatkannya") sendMessage(msg.to, "Untukku menjadi diri sendiri") sendMessage(msg.to, "Ku harus jujur, pada perasaanku") sendMessage(msg.to, "Ku suka dirimu ku suka") sendMessage(msg.to, "Ku berlari sekuat tenaga") sendMessage(msg.to, "Ku suka selalu ku suka") sendMessage(msg.to, "Ku teriak sebisa suaraku") sendMessage(msg.to, "Ku suka dirimu ku suka") sendMessage(msg.to, "Walau susah untukku bernapas") sendMessage(msg.to, "Tak akan ku sembunyikan") sendMessage(msg.to, "Oogoe daiyamondo~") sendMessage(msg.to, "Saat ku sadari sesuatu menghilang") sendMessage(msg.to, "Hati ini pun resah tidak tertahankan") sendMessage(msg.to, "Sekarang juga yang bisa ku lakukan") sendMessage(msg.to, "Merubah perasaan ke dalam kata kata") sendMessage(msg.to, "Mengapa sedari tadi") sendMessage(msg.to, "Aku hanya menatap langit") sendMessage(msg.to, "Mataku berkaca kaca") sendMessage(msg.to, "Berlinang tak bisa berhenti") sendMessage(msg.to, "Di tempat kita tinggal, didunia ini") sendMessage(msg.to, "Dipenuhi cinta, kepada seseorang") sendMessage(msg.to, "Ku yakin ooo ku yakin") sendMessage(msg.to, "Janji tak lepas dirimu lagi") sendMessage(msg.to, "Ku yakin ooo ku yakin") sendMessage(msg.to, "Akhirnya kita bisa bertemu") sendMessage(msg.to, "Ku yakin ooo ku yakin") sendMessage(msg.to, "Ku akan bahagiakan dirimu") sendMessage(msg.to, "Ku ingin kau mendengarkan") sendMessage(msg.to, "Oogoe daiyamondo~") sendMessage(msg.to, "Jika jika kamu ragu") sendMessage(msg.to, "Takkan bisa memulai apapun") sendMessage(msg.to, "Ungkapkan perasaanmu") sendMessage(msg.to, "Jujurlah dari sekarang juga") sendMessage(msg.to, "Jika kau bersuar") sendMessage(msg.to, "Cahaya kan bersinar") sendMessage(msg.to, "Ku suka dirimu ku suka") sendMessage(msg.to, "Ku berlari sekuat tenaga") sendMessage(msg.to, "Ku suka selalu ku suka") sendMessage(msg.to, "Ku teriak sebisa suaraku") sendMessage(msg.to, "Ku suka dirimu ku suka") sendMessage(msg.to, "Sampaikan rasa sayangku ini") sendMessage(msg.to, "Ku suka selalu ku suka") sendMessage(msg.to, "Ku teriakkan ditengah angin") sendMessage(msg.to, "Ku suka dirimu ku suka") sendMessage(msg.to, "Walau susah untuk ku bernapas") sendMessage(msg.to, "Tak akan ku sembunyikan") sendMessage(msg.to, "Oogoe daiyamondo~") sendMessage(msg.to, "Katakan dengan berani") sendMessage(msg.to, "Jika kau diam kan tetap sama") sendMessage(msg.to, "Janganlah kau merasa malu") sendMessage(msg.to, "“Suka” itu kata paling hebat!") sendMessage(msg.to, "“Suka” itu kata paling hebat!") sendMessage(msg.to, "“Suka” itu kata paling hebat!") sendMessage(msg.to, "Ungkapkan perasaanmu") sendMessage(msg.to, "Jujurlah dari sekarang juga..") sendMessage(msg.to, "SPAM IS DONE") sendMessage(msg.to, "Created By : T-K! for yl") #------------------------------------------------------------- if msg.text == "Tagall": group = client.getGroup(msg.to) mem = [contact.mid for contact in group.members] for mm in mem: xname = client.getContact(mm).displayName xlen = str(len(xname) + 1) msg.contentType = 0 msg.text = "@" + xname + " " msg.contentMetadata = { 'MENTION': '{"MENTIONEES":[{"S":"0","E":' + json.dumps(xlen) + ',"M":' + json.dumps(mm) + '}]}', 'EMTVER': '4' } try: client.sendMessage(msg) except Exception as error: print error #------------------------------------------------------------- if msg.text == "Speed": start = time.time() elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) print("\nCek Speed Bot") #------------------------------------------------------------- if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "sorry") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "time": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage( msg.to, "I have set a read point ♪\n「tes」I will show you who I have read ♪" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "tes": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "People who readed %s\nthat's it\n\nPeople who have ignored reads\n%sIt is abnormal ♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "An already read point has not been set.\n「set」you can send ♪ read point will be created ♪" ) else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage(msg.to, "I have set a read point ♪\n「tes」I will show you who I have read ♪") try:
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") elif "Tagall" in pesan: group = cl.getGroup(msg.to) mem = [contact.mid for contact in group.members] for mm in mem: xname = cl.getContact(mm).displayName xlen = str(len(xname)+1) msg.contentType = 0 msg.text = "@"+xname+" " msg.contentMetadata ={'MENTION':'{"MENTIONEES":[{"S":"0","E":'+json.dumps(xlen)+',"M":'+json.dumps(mm)+'}]}','EMTVER':'4'} try: cl.sendMessage(msg) except Exception as error: print error if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"sorry") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Tagall,Summon": 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
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="http://line.me/R/shop/detail/1635361", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "GroupID": sendMessage(msg.to, msg.to) if msg.text == "Info Group": group = client.getGroup(msg.to) md = "[Nama Group]\n" + group.name + "\n\n[ID Group]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Di Izinkan\n" else: md += "\n\nInvitationURL: Di Tolak\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "Orang\n\nPending: 0 Orang" else: md += "\nMembers: " + str(len( group.members)) + "Orang\nPending: " + str( len(group.invitee)) + "Orang" sendMessage(msg.to, md) if "Gn" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "linkbazon": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "linkbeband": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "Sik") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cn": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "davati Nadari....") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + " Davat Dashti bz Ro Link line.me/R/ti/p/%40nlr3381q" ) if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " I Koni hast Age Nayad") if msg.text == "man": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "Saat": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "giftset": sendMessage(msg.to, text="http://line.me/R/shop/detail/1635361", contentMetadata=None, contentType=9) if msg.text == "Set": sendMessage(msg.to, "Read Point Telah Di Atur") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Lihat": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "List Jones Yang JAdi CCTV %s\n\nMungkin Mereka Kurang Micin ♪\n\nReadPoint Di Atur Pada TAnggal Dan Waktu:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage(msg.to, "Read Point") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: #----------------------------------------------------------------------------------------------------------------------------------- if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[Nama Grup]:\n" + group.name + "\n\n[Id Grup]:\n" + group.id + "\n\n[Pembuat Grup]:\n" + gCreator + "\n\n[ProfilGrup]:\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nKode Url : Diizinkan" else: md += "\n\nLink Url : Diblokir" if group.invitee is None: md += "\nJumlah Member : " + str( len(group.members) ) + " Orang" + "\nUndangan Yang Belum Diterima : 0 Member" else: md += "\nJumlah Member : " + str( len(group.members) ) + " Member" + "\nUndangan Yang Belum Diterima : " + str( len(group.invitee)) + "Member" sendMessage(msg.to, md) if "Gn " in msg.text: if msg.toType == 2: X = client.getGroup(msg.to) X.name = msg.text.replace("Gn ", "") client.updateGroup(X) sendMessage(msg.to, "Success Mengganti Nama Grup") else: client.sendMessage(msg.to, "Siap!") if "Gcreator" in msg.text: group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" sendMessage( msg.to, "Owner Grup :\n" + group.name + "\n=> " + gCreator) if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "uni": sendMessage( msg.to, "Unicode V10\n\n1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.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g.to, "Gw juga") sendMessage(msg.to, "Suka Main ML") sendMessage(msg.to, "MobileLegend") sendMessage(msg.to, "dan gw juga suka main LGR") sendMessage(msg.to, "Lets Get Rich") sendMessage(msg.to, "Karena kedua game tersebut sangat seru!!") sendMessage(msg.to, "Bodolah :v") sendMessage(msg.to, "gw juga suka smulean") sendMessage(msg.to, "nama smule") sendMessage(msg.to, "gw") sendMessage(msg.to, "adalah") sendMessage(msg.to, "_Vipro_") sendMessage(msg.to, "") if msg.text == "buka": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Url dibuka") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL dibuka") sendMessage(msg.to, "Link Grup : ") sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "tutup": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Url ditutup") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL ditutup") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") if "nk" in msg.text: bamz0 = msg.text.replace("nk ", "") bamz1 = bamz0.lstrip() bamz2 = bamz1.replace("@", "") bamz3 = bamz2.rstrip() _linedev = bamz3 group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if _linedev in Names: kazu = Names.index(_linedev) sendMessage(msg.to, "Jgn kangem kaka..") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry ya...") else: sendMessage(msg.to, "Gk ditemukan") if "k:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "sorry kaka..") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry ya...") else: sendMessage(msg.to, "gk ditemukan") if "Bye " in msg.text: key = eval(msg.contentMetadata["MENTION"]) key["MENTIONEES"][0]["M"] targets = [] for x in key["MENTIONEES"]: targets.append(x["M"]) for target in targets: try: client.kickoutFromGroup(msg.to, [target]) except: pass if "grandom:" in msg.text: if msg.toType == 2: strnum = msg.text.replace("grandom:", "") source_str = 'abcdefghijklmnopqrstuvwxyz1234567890@:;./_][!&%$#)(=~^|' try: num = int(strnum) group = client.getGroup(msg.to) for var in range(0, num): name = "".join([ random.choice(source_str) for x in xrange(10) ]) time.sleep(0.01) group.name = name client.updateGroup(group) except: client.sendMessage( msg.to, "Error bang, coba ulang bang oke double thumbs upHar Har" ) if "stealgc" in msg.text: group = client.getGroup(msg.to) sendMessage( msg.to, "Gambar Grup :\n=> http://dl.profile.line-cdn.net/" + group.pictureStatus) if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Gk ada invitan") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + " Orang Yang udah dicancel yak") if "invitegc" in msg.text: if msg.toType == 2: ginfo = client.getGroup(msg.to) gCreator = ginfo.creator.mid try: client.findAndAddContactsByMid(gCreator) client.inviteIntoGroup(msg.to, [gCreator]) print "\nSuccess Invite gCreator" except: pass if "kickgc" in msg.text: if msg.toType == 2: ginfo = client.getGroup(msg.to) gCreator = ginfo.creator.mid try: client.kickoutFromGroup(msg.to, [gCreator]) print "\nSuccess Kick gCreator" except: pass if "cancelgc" in msg.text: if msg.toType == 2: ginfo = client.getGroup(msg.to) gCreator = ginfo.creator.mid try: client.cancelGroupInvitation(msg.to, [gCreator]) print "\nSuccess Cancel Invite gCreator" except: pass if "info @" in msg.text: name = msg.text.replace("info @", "") target = name.rstrip(' ') group = client.getGroup(msg.to) contact = [ contact.displayName for contact in group.members ] for contact in group.members: if target == contact.displayName: contact = client.getContact(contact.mid) try: cover = client.channel.getCover(contact.mid) except: cover = "" client.sendMessage( msg.to, "[Display Name]:\n" + contact.displayName + "\n\n[Mid]:\n" + contact.mid + "\n\n[BIO]:\n" + contact.statusMessage + "\n\n[Photo Profile]:\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n\n[Cover]:\n" + str(cover)) else: pass if "Cn:" in msg.text: string = msg.text.replace("Cn:", "") if len(string.decode('utf-8')) <= 20: profile_B = client.getProfile() profile_B.displayName = string client.updateProfile(profile_B) client.sendMessage(msg.to, "name " + string + " done") sendMessage(msg.to, "Change Name Success") if msg.text == "Help": sendMessage( msg.to, "-=Bot Vipro=-\n=> setpp:\n=> sepi\n=> invite:\n=> time\n=> gift\n=> on+ciduk\n=> rename:\n=> gid\n=> ginfo\n=> kickgc\n=> cancelgc\n=> invitegc\n=> cancel\n=> invitegc\n=> stealgc\n=> grandom:\n=> Bye\n=> kick:\n=> k:\n=> buka\n=> tutup\n=> nk\n=> Gn\n=> Gcreator\n=> uni\n=> spam\n=> sp\n=> mid\n=> me" ) if msg.text == "Testing": print "Cleaning Member....." _name = msg.text.replace("Testing", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Tiga") sendMessage(msg.to, "Dua") sendMessage(msg.to, "Satu") sendMessage(msg.to, "Mainkan...") sendMessage(msg.to, "Hoo aa hoo ee :v") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendMessage(msg.to, "Grup Dibersihkan") if "setpp:" in msg.text: string = msg.text.replace("setpp:", "") if len(string.decode('utf-8')) <= 500: profile = client.getProfile() profile.statusMessage = string client.updateProfile(profile) client.sendMessage(msg.to, "Update Bio Done") else: pass if msg.text == "sp": start = time.time() sendMessage(msg.to, "Tunggu...") elapsed_time = time.time() - start sendMessage(msg.to, "%s Detik" % (elapsed_time)) if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "Kontaknya si " + contact.displayName + "") if msg.text == "sepi": group = client.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(5) cb += """{"S":""" + json.dumps( str(strt)) + ""","E":""" + json.dumps(str( akh)) + ""","M":""" + json.dumps(md) + "}," "" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error if msg.text == "time": sendMessage( msg.to, "Tanggal sekarang = " + datetime.datetime.today().strftime('%d-%m-%y')) sendMessage( msg.to, "Waktu sekarang = " + datetime.datetime.today().strftime('%H:%M:%S')) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata={ 'PRDID': '3b92ccf5-54d3-4765-848f-c9ffdc1da020', 'PRDTYPE': 'THEME', 'MSGTPL': '2' }, contentType=9) if msg.text == "on": sendMessage(msg.to, "com") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%d-%m-%y %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "ciduk": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "⭐⭐SIDER⭐⭐%s\n⭐⭐TERCYDUK⭐⭐\n\n🌟🌟CCTV🌟🌟\n%s🌟🌟CCTV🌟🌟\n\n🔰Waktu🔰\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage(msg.to, "cek dulu Har Har\nBaru ciduk") else: pass else: pass #----------------------------------------------------------------------------------------------------------------------------------- except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "Salken": print "ok" _name = msg.text.replace("Mulai", "") gs = client.getGroup(msg.to) sendMessage( msg.to, "Halooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" ) targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") if msg.text in ["@tag"]: group = client.getGroup(msg.to) nama = [contact.mid for contact in group.members] nm1, nm2, nm3, jml = [], [], [], len(nama) if jml <= 100: mention(msg.to, nama) if jml > 100 and jml < 200: for i in range(0, 99): nm1 += [nama[i]] mention(msg.to, nm1) for j in range(100, len(nama) - 1): nm2 += [nama[j]] mention(msg.to, nm2) if jml > 200 and jml < 300: for i in range(0, 99): nm1 += [nama[i]] mention(msg.to, nm1) for j in range(100, 199): nm2 += [nama[j]] mention(msg.to, nm2, jml) for k in range(200, len(nama) - 1): nm3 += [nama[k]] mention(msg.to, nm3, jml) if jml > 300: print "Terlalu Banyak Men 300+" cnt = Message() cnt.text = "Done:" + str(jml) cont.to = msg.to client.sendMessage(cnt) if msg.text == "Mid": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "Ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "Gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "Url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "Close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "Kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "sorry") if "Nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "Invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "Me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "Show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "Time": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Sider": sendMessage(msg.to, "Har Har") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Read": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "T E R C Y D U K %s\nHar Har\n\nT E R S A N G K A\n%sHar Har\n\nTanggal Dan Waktu Kejadian:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage(msg.to, "Ketik「set」Har Har") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open [BOT]": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open [BOT]") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Opened [BOT]") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close [BOT]") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL closed [BOT]") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"dadah (cry) [BOT]") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Maap ngga sengaja :v [BOT]") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Maap ngga sengaja :v [BOT]") else: sendMessage(msg.to, "hah? [BOT]") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting. [BOT]") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done [BOT]") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you [BOT]") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime( '%d Tanggal %m Bulan %Y Tahun %H:%M:%S' ) + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "cyduck mode": sendMessage(msg.to, "watchout tercyduck! [BOT]") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "cyduck": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Yang ngebaca %s\nthat's it\n\ Siders yang Tercyduck :v\n%slt ciee Tercyduck :v [BOT]\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Pasang [cyduck mode] dulu :) [BOT]") else: pass else: pass except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text in ["Mid", "mid"]: sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "Ginfo": group = client.getGroup(msg.to) md = "Name: " + group.name + "\n\nId: " + group.id + "\n\nGroup Picture: http://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: " + "line://ti/g/" + client._client.reissueGroupTicket( msg.to) else: md += "\n\nInvitationURL: Refusing" if group.invitee is None: md += "\n\nMembers: " + str(len( group.members)) + "\n\nInvited: -" else: md += "\n\nMembers: " + str(len( group.members)) + "\n\nInvited: " + str( len(group.invitee)) sendMessage(msg.to, md) if "Gname: " in msg.text: key = msg.text.replace("Gname: ", "") group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group name canged to " + key) if msg.text == "Gurl": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Gopen": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Already Open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "Group URL Open") if msg.text == "Gclose": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Already Close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "Group URL Close") if "Kick: " in msg.text: key = msg.text.replace("Kick: ", "") group = client.getGroup(msg.to) client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " sorry") if "Nk: " in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf dude??") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Nope") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "Invite: " in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text in ["Good bye", "good bye"]: client.leaveGroup(msg.to) if msg.text in ["sp", "Sp", "Speed"]: start = time.time() elapsed_time = time.time() - start sendMessage(msg.to, "%s Seconds" % (elapsed_time)) if msg.text == "Me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "Show: " in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text in ["Time", "time"]: sendMessage( msg.to, "Sekarang Jam " + datetime.datetime.today().strftime( '%H:%M:%S\nTanggal %Y-%m-%d ')) if msg.text in ["Gift", "gift"]: sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text in ["Set", "set", "?"]: #sendMessage(msg.to, "Har Har") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text in ["Cek", "cek", "!"]: if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "People who readed %s\nthat's it\n\nPeople who have ignored reads\n%sIt is abnormal ♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage(msg.to, "Nope") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"sorry") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text in ["/battle"]; cl.sendText(msg.to,"/join") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage(msg.to, "I have set a read point ♪\n「tes」I will show you who I have read ♪") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "tes": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "People who readed %s\nthat's it\n\nPeople who have ignored reads\n%sIt is abnormal ♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "An already read point has not been set.\n「set」you can send ♪ read point will be created ♪") else: pass
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: #----------------------------------------------------------------------------------------------------------------------------------- if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[Nama Grup]:\n" + group.name + "\n\n[Id Grup]:\n" + group.id + "\n\n[Pembuat Grup]:\n" + gCreator + "\n\n[Gambar Grup]:\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nKode Url : Diizinkan" else: md += "\n\nKode Url : Diblokir" if group.invitee is None: md += "\nJumlah Member : " + str(len(group.members)) + " Orang" + "\nUndangan Yang Belum Diterima : 0 Orang" else: md += "\nJumlah Member : " + str(len(group.members)) + " Orang" + "\nUndangan Yang Belum Diterima : " + str(len(group.invitee)) + " Orang" sendMessage(msg.to,md) if "help" in msg.text: sendMessage(msg.to,"\n Ḷ̩̼̝̺̘͖ͩͨ͛ͬ̇̎Ì̢͕̪̮̤̻̠̬͂̉Ň̵̪̙͊͐̿ͧE̸̖̯̗̥͍̳̻̳ͤͬͥͨ̑̄ͮ ̓̍ͣͣͮ҉̝͇͓̱͙D̼̪̿̉̔̈́ͥͨ͟Ḛ̡̫̮͔͓̫̈̄̊̌̎̀̋͟V͚̬͕̝̣͍͇̲͖̉̓͋ͨ̚͢͞E͓ͪ̐̿̇̃͋̂͗L͚̦̝̎̄̾́͠O̵͎̹̻̘̒͂̌̾͒͒̇̀P̷͖̬̲͕̖͍ͤ͒ͮ̿̌̕ͅE͈̖͉͖̻̒́̆͒̓̋ͣͅR̷̭͚̯̔ͤ͂ͧ̇͟S̵̺̞͓̥̖͍͈ͩ̌̌̾̀̔͒͑ ̷̢̧̥͎̯̀̆͌B̶̛͎̹̯̎̏ͯ̀̓̉͒͐̈́͜Ō͗̈́͋ͯͭ͠҉͏͈̘͔̙̱̯̥̯͉T͕̹̲̱̱̠̜̃͋ͧ̂̌̆ͫ͒̒͠S͖ͨ̓̾̂\n\n-----------------------------------------------------------------\n「Help Command [Base Command] :」\n=> [seţ]\n=> [siďer]\n=> [ʍe]\n=> [ʍid]\n=> [ǥid]\n=> [ǥinfo]\n=> [ţime]\n=> [þuka]\n=> [ţutup]\n=> [µrl]\n=> [ǥift]\n=> [ȼancel]\n=> [ɨnvite:「By Mid」]\n=> [ȿhow:「By Mid」\n\n「Help Command [Clone/MyBF Command] :」\n=> [ɨnvαllȼlone]\n=> [кickαllȼlone]\n=> [ȼancelαllȼlone]\n=> [ɨnvαllмybf]\n=> [кickαllмybf]\n=> [ȼancelαllмybf]\n=> [ɨnvȼlone:「No.1-8」]\n=> [кickȼlone:「No.1-8」]\n=> [ȼancelȼlone:「No.1-8」]\n=> [ɨnvмybf:「No.1-8」]\n=> [кickмybf:「No.1-8」]\n=> [ȼancelмybf:「No.1-8」]\n=> [ℓistȼlone]\n=> [ℓistмybf]\n\n「Help Command [Mod Command] :」\n=> [ǥrandom:「Nomor」]\n=> [μp]\n=> [ȿpeed]\n=> [ţagall]\n=> [Ğn 「Nama」]\n=> [ǥroupȼreate]\n=> [ɨnvǥȼreator]\n=> [яename:「Ganti Nama Profil」]\n=> [вσтмαкєя]\n\n「Help Command [Use For Kicker Only] :」\n=> [к:「By Name」]\n=> [ик「By Tag」]\n=> [мulai]\n=> [µni]\n=> [вye「By Tag」]\n\n「Info Bots :」\n=> Based on : Vodka\n=> Support By : Line Developers\n=> Modding By : Bamzky\n=> Version Mod : 2.2.1beta\n-----------------------------------------------------------------\n\n Ḷ̩̼̝̺̘͖ͩͨ͛ͬ̇̎Ì̢͕̪̮̤̻̠̬͂̉Ň̵̪̙͊͐̿ͧE̸̖̯̗̥͍̳̻̳ͤͬͥͨ̑̄ͮ ̓̍ͣͣͮ҉̝͇͓̱͙D̼̪̿̉̔̈́ͥͨ͟Ḛ̡̫̮͔͓̫̈̄̊̌̎̀̋͟V͚̬͕̝̣͍͇̲͖̉̓͋ͨ̚͢͞E͓ͪ̐̿̇̃͋̂͗L͚̦̝̎̄̾́͠O̵͎̹̻̘̒͂̌̾͒͒̇̀P̷͖̬̲͕̖͍ͤ͒ͮ̿̌̕ͅE͈̖͉͖̻̒́̆͒̓̋ͣͅR̷̭͚̯̔ͤ͂ͧ̇͟S̵̺̞͓̥̖͍͈ͩ̌̌̾̀̔͒͑ ̷̢̧̥͎̯̀̆͌B̶̛͎̹̯̎̏ͯ̀̓̉͒͐̈́͜Ō͗̈́͋ͯͭ͠҉͏͈̘͔̙̱̯̥̯͉T͕̹̲̱̱̠̜̃͋ͧ̂̌̆ͫ͒̒͠S͖ͨ̓̾̂\n") if "Gn " in msg.text: if msg.toType == 2: X = client.getGroup(msg.to) X.name = msg.text.replace("Gn ","") client.updateGroup(X) sendMessage(msg.to,"Udah diganti tuh nama grupnya Har Har") else: client.sendMessage(msg.to,"Gabisa digunain digrup Har Har") if "groupcreate" in msg.text: group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" sendMessage(msg.to,"Pembuat Grup :\n" + group.name + "\n=> " + gCreator) if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "uni": sendMessage(msg.to,"Hai Perkenalkan.....\nNama saya teh saha ya?\n\n1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.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1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1\n\nMakasih Sudah Dilihat :)\nJangan Dikick ampun mzz :v") if msg.text == "up": sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh") sendMessage(msg.to,"eh udah eh spamnya nanti dimarahin Har Har") if msg.text == "buka": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Sudah dibuka mzque :v") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL dibuka") sendMessage(msg.to,"Link Grup : ") sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "tutup": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Sudah ditutup mzque :v") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL ditutup") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" maapin say Har Har") if "invallclone" in msg.text: print "\n[invite all clone]ok\n" mid1 = ("u6db82b481cff8971ede277f8a5c0b6fb") mid2 = ("u324905ea88407b94a371ddc65d877b8b") mid3 = ("ua2bd76c8b8f57dd524b0d220eb5116e6") mid4 = ("uac1e69cc7b8c53baa9059ff96f46a320") mid5 = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") mid6 = ("ud9169423f358a268e653bd86f5c20313") mid7 = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") mid8 = ("uaf068b846114a324f7184e7f13aec5d5") try: client.findAndAddContactsByMid(mid1) client.inviteIntoGroup(msg.to,[mid1]) client.findAndAddContactsByMid(mid2) client.inviteIntoGroup(msg.to,[mid2]) client.findAndAddContactsByMid(mid3) client.inviteIntoGroup(msg.to,[mid3]) client.findAndAddContactsByMid(mid4) client.inviteIntoGroup(msg.to,[mid4]) client.findAndAddContactsByMid(mid5) client.inviteIntoGroup(msg.to,[mid5]) client.findAndAddContactsByMid(mid6) client.inviteIntoGroup(msg.to,[mid6]) client.findAndAddContactsByMid(mid7) client.inviteIntoGroup(msg.to,[mid7]) client.findAndAddContactsByMid(mid8) client.inviteIntoGroup(msg.to,[mid8]) client.sendMessage(msg.to,"Success Invite All Clone") except: pass if "kickallclone" in msg.text: group = client.getGroup(msg.to) print "\n[kick all clone]ok\n" mid1 = ("u6db82b481cff8971ede277f8a5c0b6fb") mid2 = ("u324905ea88407b94a371ddc65d877b8b") mid3 = ("ua2bd76c8b8f57dd524b0d220eb5116e6") mid4 = ("uac1e69cc7b8c53baa9059ff96f46a320") mid5 = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") mid6 = ("ud9169423f358a268e653bd86f5c20313") mid7 = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") mid8 = ("uaf068b846114a324f7184e7f13aec5d5") try: client.kickoutFromGroup(msg.to,[mid1]) client.kickoutFromGroup(msg.to,[mid2]) client.kickoutFromGroup(msg.to,[mid3]) client.kickoutFromGroup(msg.to,[mid4]) client.kickoutFromGroup(msg.to,[mid5]) client.kickoutFromGroup(msg.to,[mid6]) client.kickoutFromGroup(msg.to,[mid7]) client.kickoutFromGroup(msg.to,[mid8]) client.sendMessage(msg.to,"Success Kick All Clone") except: pass if "cancelallclone" in msg.text: group = client.getGroup(msg.to) print "\n[cancel invite all clone]ok\n" mid1 = ("u6db82b481cff8971ede277f8a5c0b6fb") mid2 = ("u324905ea88407b94a371ddc65d877b8b") mid3 = ("ua2bd76c8b8f57dd524b0d220eb5116e6") mid4 = ("uac1e69cc7b8c53baa9059ff96f46a320") mid5 = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") mid6 = ("ud9169423f358a268e653bd86f5c20313") mid7 = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") mid8 = ("uaf068b846114a324f7184e7f13aec5d5") try: client.cancelGroupInvitation(msg.to,[mid1]) client.cancelGroupInvitation(msg.to,[mid2]) client.cancelGroupInvitation(msg.to,[mid3]) client.cancelGroupInvitation(msg.to,[mid4]) client.cancelGroupInvitation(msg.to,[mid5]) client.cancelGroupInvitation(msg.to,[mid6]) client.cancelGroupInvitation(msg.to,[mid7]) client.cancelGroupInvitation(msg.to,[mid8]) client.sendMessage(msg.to,"Success Cancel Invitation All Clone") except: pass if "invallmybf" in msg.text: print "\n[invite all my best friends]ok\n" mid1 = ("ubd3b0f3cecc30ca33bf939dab7e6848a") mid2 = ("u75a663be511eaef40ce5829de072c5ce") mid3 = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.findAndAddContactsByMid(mid1) client.inviteIntoGroup(msg.to,[mid1]) client.findAndAddContactsByMid(mid2) client.inviteIntoGroup(msg.to,[mid2]) client.findAndAddContactsByMid(mid3) client.inviteIntoGroup(msg.to,[mid3]) except: pass if "kickallmybf" in msg.text: group = client.getGroup(msg.to) print "\n[kick all my best friends]ok\n" mid1 = ("ubd3b0f3cecc30ca33bf939dab7e6848a") mid2 = ("u75a663be511eaef40ce5829de072c5ce") mid3 = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.kickoutFromGroup(msg.to,[mid1]) client.kickoutFromGroup(msg.to,[mid2]) client.kickoutFromGroup(msg.to,[mid3]) except: pass if "cancelallmybf" in msg.text: group = client.getGroup(msg.to) print "\n[cancel invitation to all my best friends]ok\n" mid1 = ("ubd3b0f3cecc30ca33bf939dab7e6848a") mid2 = ("u75a663be511eaef40ce5829de072c5ce") mid3 = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.cancelGroupInvitation(msg.to,[mid1]) client.cancelGroupInvitation(msg.to,[mid2]) client.cancelGroupInvitation(msg.to,[mid3]) except: pass if "nk" in msg.text: bamz0 = msg.text.replace("nk ","") bamz1 = bamz0.lstrip() bamz2 = bamz1.replace("@","") bamz3 = bamz2.rstrip() _linedev = bamz3 group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if _linedev in Names: kazu = Names.index(_linedev) sendMessage(msg.to, "Dada! Jan kangen njir :v") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" maapin say Har Har") else: sendMessage(msg.to,"salah goblog Har Har") if "k:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Dada! Jan kangen njir :v") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" maapin say Har Har") else: sendMessage(msg.to, "salah goblog Har Har") if "Bye " in msg.text: key = eval(msg.contentMetadata["MENTION"]) key["MENTIONEES"][0]["M"] targets = [] for x in key["MENTIONEES"]: targets.append(x["M"]) for target in targets: try: client.kickoutFromGroup(msg.to,[target]) except: pass if "grandom:" in msg.text: if msg.toType == 2: strnum = msg.text.replace("grandom:","") source_str = 'abcdefghijklmnopqrstuvwxyz1234567890@:;./_][!&%$#)(=~^|' try: num = int(strnum) group = client.getGroup(msg.to) for var in range(0,num): name = "".join([random.choice(source_str) for x in xrange(10)]) time.sleep(0.01) group.name = name client.updateGroup(group) except: client.sendMessage(msg.to,"Error bang, coba ulang bang oke double thumbs upHar Har") if "gid" in msg.text: group = client.getGroup(msg.to) sendMessage(msg.to, group.id) if "stealgroupimage" in msg.text: group = client.getGroup(msg.to) sendMessage(msg.to,"http://dl.profile.line-cdn.net/" + group.pictureStatus) if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Kagak ada yang diinv anjir Har Har apaan yang mau dicancel coba Har Har") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Orang Yang udah dicancel yak") if "invgcreator" in msg.text: if msg.toType == 2: ginfo = client.getGroup(msg.to) gCreator = ginfo.creator.mid try: client.findAndAddContactsByMid(gCreator) client.inviteIntoGroup(msg.to,[gCreator]) print "\nSuccess Invite gCreator" except: pass if "botmaker" in msg.text: M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': "u12c5cf853784842cd2e4354e91e66804"} client.sendMessage(M) if "invclone:1" in msg.text: mid = ("u6db82b481cff8971ede277f8a5c0b6fb") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:2" in msg.text: mid = ("u324905ea88407b94a371ddc65d877b8b") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:3" in msg.text: mid = ("ua2bd76c8b8f57dd524b0d220eb5116e6") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:4" in msg.text: mid = ("uac1e69cc7b8c53baa9059ff96f46a320") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:5" in msg.text: mid = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:6" in msg.text: mid = ("ud9169423f358a268e653bd86f5c20313") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:7" in msg.text: mid = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invclone:8" in msg.text: mid = ("uaf068b846114a324f7184e7f13aec5d5") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "kickclone:1" in msg.text: group = client.getGroup(msg.to) mid = ("u6db82b481cff8971ede277f8a5c0b6fb") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:2" in msg.text: group = client.getGroup(msg.to) mid = ("u324905ea88407b94a371ddc65d877b8b") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:3" in msg.text: group = client.getGroup(msg.to) mid = ("ua2bd76c8b8f57dd524b0d220eb5116e6") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:4" in msg.text: group = client.getGroup(msg.to) mid = ("uac1e69cc7b8c53baa9059ff96f46a320") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:5" in msg.text: group = client.getGroup(msg.to) mid = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:6" in msg.text: group = client.getGroup(msg.to) mid = ("ud9169423f358a268e653bd86f5c20313") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:7" in msg.text: group = client.getGroup(msg.to) mid = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickclone:8" in msg.text: group = client.getGroup(msg.to) mid = ("uaf068b846114a324f7184e7f13aec5d5") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "cancelclone:1" in msg.text: group = client.getGroup(msg.to) mid = ("u6db82b481cff8971ede277f8a5c0b6fb") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:2" in msg.text: group = client.getGroup(msg.to) mid = ("u324905ea88407b94a371ddc65d877b8b") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:3" in msg.text: group = client.getGroup(msg.to) mid = ("ua2bd76c8b8f57dd524b0d220eb5116e6") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:4" in msg.text: group = client.getGroup(msg.to) mid = ("uac1e69cc7b8c53baa9059ff96f46a320") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:5" in msg.text: group = client.getGroup(msg.to) mid = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:6" in msg.text: group = client.getGroup(msg.to) mid = ("ud9169423f358a268e653bd86f5c20313") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:7" in msg.text: group = client.getGroup(msg.to) mid = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelclone:8" in msg.text: group = client.getGroup(msg.to) mid = ("uaf068b846114a324f7184e7f13aec5d5") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "invmybf:1" in msg.text: mid = ("ubd3b0f3cecc30ca33bf939dab7e6848a") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invmybf:2" in msg.text: mid = ("u75a663be511eaef40ce5829de072c5ce") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "invmybf:3" in msg.text: mid = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.findAndAddContactsByMid(mid) client.inviteIntoGroup(msg.to,[mid]) except: pass if "kickmybf:1" in msg.text: group = client.getGroup(msg.to) mid = ("ubd3b0f3cecc30ca33bf939dab7e6848a") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickmybf:2" in msg.text: group = client.getGroup(msg.to) mid = ("u75a663be511eaef40ce5829de072c5ce") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "kickmybf:3" in msg.text: group = client.getGroup(msg.to) mid = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.kickoutFromGroup(msg.to,[mid]) except: pass if "cancelmybf:1" in msg.text: group = client.getGroup(msg.to) mid = ("ubd3b0f3cecc30ca33bf939dab7e6848a") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelmybf:2" in msg.text: group = client.getGroup(msg.to) mid = ("u75a663be511eaef40ce5829de072c5ce") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "cancelmybf:3" in msg.text: group = client.getGroup(msg.to) mid = ("u22d94aac4e1659eb6f375ffc7cb17a53") try: client.cancelGroupInvitation(msg.to,[mid]) except: pass if "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") if txt[1] == "on": if jmlh <= 300: for x in range(jmlh): client.sendMessage(msg.to, teks) else: client.sendMessage(msg.to, "Kelebihan batas:v") if txt[1] == "off": if jmlh <= 300: client.sendMessage(msg.to, tulisan) else: client.sendMessage(msg.to, "Kelebihan batas :v") if "rename:" in msg.text: string = msg.text.replace("rename:","") if len(string.decode('utf-8')) <= 20: profile_B = client.getProfile() profile_B.displayName = string client.updateProfile(profile_B) client.sendMessage(msg.to,"name " + string + " done") sendMessage(msg.to,"Udah diganti namanya, coba cek Har Har") if "InviteMeTo: " in msg.text: gid = msg.text.replace("InviteMeTo: ","") if gid == "": client.sendMessage(msg.to,"Invalid group id") else: try: client.findAndAddContactsByMid(msg.from_) client.inviteIntoGroup(gid,[msg.from_]) except: client.sendMessage(msg.to,"Mungkin saya tidak di dalam grup itu") if "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: client.sendMessage(msg.to, g.mid) else: pass if "listclone" in msg.text: mid1 = ("u6db82b481cff8971ede277f8a5c0b6fb") mid2 = ("u324905ea88407b94a371ddc65d877b8b") mid3 = ("ua2bd76c8b8f57dd524b0d220eb5116e6") mid4 = ("uac1e69cc7b8c53baa9059ff96f46a320") mid5 = ("uf57a34c5ad1bc3e2dafe5e6505c357a5") mid6 = ("ud9169423f358a268e653bd86f5c20313") mid7 = ("ub4d9374d6cc45d1171f60ac4e8d0ba0b") mid8 = ("uaf068b846114a324f7184e7f13aec5d5") contact = client.getContact(mid1) contact1 = client.getContact(mid2) contact2 = client.getContact(mid3) contact3 = client.getContact(mid4) contact4 = client.getContact(mid5) contact5 = client.getContact(mid6) contact6 = client.getContact(mid7) contact7 = client.getContact(mid8) sendMessage(msg.to,"[List Clone]:\n=> 1." + contact.displayName + "\n=> 2." + contact1.displayName + "\n=> 3." + contact2.displayName + "\n=> 4." + contact3.displayName + "\n=> 5." + contact4.displayName + "\n=> 6." + contact5.displayName + "\n=> 7." + contact6.displayName + "\n=> 8." + contact7.displayName + "\n\nStatus Clone : Aktif\nStatus diambil pada :\nTanggal : " + datetime.datetime.today().strftime('%d-%m-%y') + "\nWaktu : " + datetime.datetime.today().strftime('%H:%M:%S')) if "listmybf" in msg.text: mid1 = ("ubd3b0f3cecc30ca33bf939dab7e6848a") mid2 = ("u75a663be511eaef40ce5829de072c5ce") mid3 = ("u22d94aac4e1659eb6f375ffc7cb17a53") contact = client.getContact(mid1) contact1 = client.getContact(mid2) contact2 = client.getContact(mid3) sendMessage(msg.to,"[List My Best Friends]:\n=> 1." + contact.displayName + "\n=> 2." + contact1.displayName + "\n=> 3." + contact2.displayName + "\n\nCek List dilihat pada :\nTanggal : " + datetime.datetime.today().strftime('%d-%m-%y') + "\nWaktu : " + datetime.datetime.today().strftime('%H:%M:%S')) if msg.text == "Mulai": print "Cleaning Member....." _name = msg.text.replace("Mulai","") gs = client.getGroup(msg.to) sendMessage(msg.to,"Hi, B-I-T-C-H") sendMessage(msg.to,"Just f*****g cleaning member") sendMessage(msg.to,"Jadi gausah bacot anjing") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"error") else: for target in targets: try: klist=[client] kicker=random.choice(klist) kicker.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendMessage(msg.to,"Grup Dibersihkan") if msg.text == "speed": start = time.time() sendMessage(msg.to, "Processing...") elapsed_time = time.time() - start sendMessage(msg.to, "%s Detik" % (elapsed_time)) if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "Kontaknya si "+contact.displayName+"") if msg.text == "tagall": group = client.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(5) cb += """{"S":"""+json.dumps(str(strt))+""","E":"""+json.dumps(str(akh))+""","M":"""+json.dumps(md)+"},""" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error if msg.text == "time": sendMessage(msg.to, "Tanggal sekarang = " + datetime.datetime.today().strftime('%d-%m-%y')) sendMessage(msg.to, "Waktu sekarang = " + datetime.datetime.today().strftime('%H:%M:%S')) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage(msg.to, "Dasar sider lucknut :v \nKetik 「sider」 gua bakal ngasih tau siapa sidernya") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%d-%m-%y %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "sider": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Nih sider lucknut %s\nTadaaaa.....\n\nYang sider doang kerjaannya\n%sGileee benerrr..\n\nSider dilihat pada tanggal dan waktu:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Belom di set dodol Har Har\nKetik 「set」 buat lihat siapa sider lucknut :v") else: pass else: pass #----------------------------------------------------------------------------------------------------------------------------------- except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: #----------------------------------------------------------------------------------------------------------------------------------- if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[Nama Grup : ]\n" + group.name + "\n\n[Id Grup : ]\n" + group.id + "\n\n[Pembuat Grup :]\n" + gCreator + "\n\n[Gambar Grup : ]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nKode Url : Diizinkan" else: md += "\n\nKode Url : Diblokir" if group.invitee is None: md += "\nJumlah Member : " + str( len(group.members) ) + " Orang" + "\nUndangan Yang Belum Diterima : 0 Orang" else: md += "\nJumlah Member : " + str( len(group.members) ) + " Orang" + "\nUndangan Yang Belum Diterima : " + str( len(group.invitee)) + " Orang" sendMessage(msg.to, md) if "help" in msg.text: sendMessage( msg.to, "Ḷ̩̼̝̺̘͖ͩͨ͛ͬ̇̎Ì̢͕̪̮̤̻̠̬͂̉Ň̵̪̙͊͐̿ͧE̸̖̯̗̥͍̳̻̳ͤͬͥͨ̑̄ͮ ̓̍ͣͣͮ҉̝͇͓̱͙D̼̪̿̉̔̈́ͥͨ͟Ḛ̡̫̮͔͓̫̈̄̊̌̎̀̋͟V͚̬͕̝̣͍͇̲͖̉̓͋ͨ̚͢͞E͓ͪ̐̿̇̃͋̂͗L͚̦̝̎̄̾́͠O̵͎̹̻̘̒͂̌̾͒͒̇̀P̷͖̬̲͕̖͍ͤ͒ͮ̿̌̕ͅE͈̖͉͖̻̒́̆͒̓̋ͣͅR̷̭͚̯̔ͤ͂ͧ̇͟S̵̺̞͓̥̖͍͈ͩ̌̌̾̀̔͒͑ ̷̢̧̥͎̯̀̆͌B̶̛͎̹̯̎̏ͯ̀̓̉͒͐̈́͜Ō͗̈́͋ͯͭ͠҉͏͈̘͔̙̱̯̥̯͉T͕̹̲̱̱̠̜̃͋ͧ̂̌̆ͫ͒̒͠S͖ͨ̓̾̂\n\nHelp Command:\n[seţ]\n[siďer]\n[ʍe]\n[ʍid]\n[ǥid]\n[ǥinfo]\n[ţime]\n[þuka]\n[ţutup]\n[µrl]\n[ǥift]\n[ȿpeed]\n[μp]\n[ţagall]\n[ȼancel]\n[Ğn 「Nama」]\n[ɨnvite:「By Mid」]\n[ȿhow:「By Mid」\n[яename:「Ganti Nama Profil」]\n[Invite ǥcreator]\n\nHelp Command 「Kicker Only」:\n[к:「By Name」]\n[ик「By Tag」]\n[мulai]\n[µni]\n[Bye「By Tag」]\n\nBased on : Vodka\nLink : http://github.com/merkremont/LineVodka\nSupport By : Line Developers\nModding By : Bamzky\nVersion Mod : 2.0.3beta\n\nḶ̩̼̝̺̘͖ͩͨ͛ͬ̇̎Ì̢͕̪̮̤̻̠̬͂̉Ň̵̪̙͊͐̿ͧE̸̖̯̗̥͍̳̻̳ͤͬͥͨ̑̄ͮ ̓̍ͣͣͮ҉̝͇͓̱͙D̼̪̿̉̔̈́ͥͨ͟Ḛ̡̫̮͔͓̫̈̄̊̌̎̀̋͟V͚̬͕̝̣͍͇̲͖̉̓͋ͨ̚͢͞E͓ͪ̐̿̇̃͋̂͗L͚̦̝̎̄̾́͠O̵͎̹̻̘̒͂̌̾͒͒̇̀P̷͖̬̲͕̖͍ͤ͒ͮ̿̌̕ͅE͈̖͉͖̻̒́̆͒̓̋ͣͅR̷̭͚̯̔ͤ͂ͧ̇͟S̵̺̞͓̥̖͍͈ͩ̌̌̾̀̔͒͑ ̷̢̧̥͎̯̀̆͌B̶̛͎̹̯̎̏ͯ̀̓̉͒͐̈́͜Ō͗̈́͋ͯͭ͠҉͏͈̘͔̙̱̯̥̯͉T͕̹̲̱̱̠̜̃͋ͧ̂̌̆ͫ͒̒͠S͖ͨ̓̾̂" ) if "Gn " in msg.text: if msg.toType == 2: X = client.getGroup(msg.to) X.name = msg.text.replace("Gn ", "") client.updateGroup(X) sendMessage( msg.to, "Udah diganti tuh nama grupnya Har Har") else: client.sendMessage( msg.to, "Gabisa digunain digrup Har Har") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "uni": sendMessage( msg.to, "Hai Perkenalkan.....\nNama saya teh saha ya?\n\n1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1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.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1\n\nMakasih Sudah Dilihat :)\nJangan Dikick ampun mzz :v" ) if msg.text == "up": sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage(msg.to, "eh") sendMessage( msg.to, "eh udah eh spamnya nanti dimarahin Har Har") if msg.text == "buka": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Sudah dibuka mzque :v") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL dibuka") sendMessage(msg.to, "Link Grup : ") sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "tutup": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Sudah ditutup mzque :v") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL ditutup") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") if "nk" in msg.text: bamz0 = msg.text.replace("nk ", "") bamz1 = bamz0.lstrip() bamz2 = bamz1.replace("@", "") bamz3 = bamz2.rstrip() _linedev = bamz3 group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if _linedev in Names: kazu = Names.index(_linedev) sendMessage(msg.to, "Dada! Jan kangen njir :v") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") else: sendMessage(msg.to, "salah goblog Har Har") if "k:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Dada! Jan kangen njir :v") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage( msg.to, "" + contact.displayName + " maapin say Har Har") else: sendMessage(msg.to, "salah goblog Har Har") if "Bye " in msg.text: key = eval(msg.contentMetadata["MENTION"]) key["MENTIONEES"][0]["M"] targets = [] for x in key["MENTIONEES"]: targets.append(x["M"]) for target in targets: try: client.kickoutFromGroup(msg.to, [target]) except: pass if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage( op.message.to, "Kagak ada yang diinv anjir Har Har apaan yang mau dicancel coba Har Har" ) else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + " Yang udah dicancel yak") if "Mid @" in msg.text: if msg.contentType == 13: _name = msg.text.replace("Mid @", "") _nametarget = _name.rstrip() gs = client.getGroup(msg.to) for g in gs.members: if _nametarget == g.displayName: msg.contentMetadata = {'mid': g.mid} client.sendMessage(msg) else: pass if "Invite gcreator" in msg.text: if msg.toType == 2: ginfo = client.getGroup(msg.to) gCreator = ginfo.creator.mid try: client.findAndAddContactsByMid(gCreator) client.inviteIntoGroup(msg.to, [gCreator]) print "Success Invite gCreator" except: pass if "Steal: " in msg.text: _bamz = msg.text.replace("Steal: ", "") _bamz0 = client.getContact(_bamz) _bamz1 = "http://dl.profile.line-cdn.net/" + contact.pictureStatus try: cover = client.channel.getCover(_bamz0) except: cover = "" client.sendMessage(msg.to, "Gambar Foto Profilenya") client.sendImageWithURL(msg.to, _bamz1) if cover == "": client.sendMessage( msg.to, "User tidak memiliki cover atau sejenisnya") else: client.sendMessage(msg.to, "Gambar Covernya") client.sendImageWithURL(msg.to, cover) if "rename:" in msg.text: string = msg.text.replace("rename:", "") if len(string.decode('utf-8')) <= 20: profile_B = client.getProfile() profile_B.displayName = string client.updateProfile(profile_B) client.sendMessage(msg.to, "name " + string + " done") sendMessage( mgs.to, "Udah diganti namanya, coba cek Har Har") if msg.text == "Mulai": print "Cleaning Member....." _name = msg.text.replace("Mulai", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Hi, B-I-T-C-H") sendMessage(msg.to, "Just f*****g cleaning member") sendMessage(msg.to, "Jadi gausah bacot anjing") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendMessage(msg.to, "Grup Dibersihkan") if msg.text == "speed": start = time.time() sendMessage(msg.to, "Processing...") elapsed_time = time.time() - start sendMessage(msg.to, "%s Detik" % (elapsed_time)) if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " Gua inv lu yak :v") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "Kontaknya si " + contact.displayName + "") if msg.text == "tagall": group = client.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(5) cb += """{"S":""" + json.dumps( str(strt)) + ""","E":""" + json.dumps(str( akh)) + ""","M":""" + json.dumps(md) + "}," "" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error if msg.text == "time": sendMessage( msg.to, "Tanggal sekarang = " + datetime.datetime.today().strftime('%d-%m-%y')) sendMessage( msg.to, "Waktu sekarang = " + datetime.datetime.today().strftime('%H:%M:%S')) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage( msg.to, "Dasar sider lucknut :v \nKetik 「sider」 gua bakal ngasih tau siapa sidernya" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%d-%m-%y %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "sider": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "Nih sider lucknut %s\nTadaaaa.....\n\nYang sider doang kerjaannya\n%sGileee benerrr..\n\nSider dilihat pada tanggal dan waktu:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "Belom di set dodol Har Har\nKetik 「set」 buat lihat siapa sider lucknut :v" ) else: pass else: pass #----------------------------------------------------------------------------------------------------------------------------------- except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "url": if msg.from_ in admin: sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": if msg.from_ in admin: group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": if msg.from_ in admin: group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: if msg.from_ in admin: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"sorry") if "nk:" in msg.text: if msg.from_ in admin: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: if msg.from_ in admin: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage(msg.to, "I have set a read point ♪\n「viewlastseen」I will show you who I have read ♪") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "tes": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "People who readed %s\nthat's it\n\nPeople who have ignored reads\n%sIt is abnormal ♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "An already read point has not been set.\n「set」you can send ♪ read point will be created ♪") else: pass else: pass if msg.text == "Hai all": if msg.from_ in admin: group = client.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(5) cb += """{"S":"""+json.dumps(str(strt))+""","E":"""+json.dumps(str(akh))+""","M":"""+json.dumps(md)+"},""" strt = strt + int(6) 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: client.sendMessage(msg) except Exception as error: print error except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return tracer.addOpInterrupt(25,SEND_MESSAGE) while True: tracer.execute()
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "linetheme": sendMessage(msg.to, text="channel Line Theme t.me/line_theme ", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[اسم گروه]\n" + group.name + "\n\n[ایدی گروه]\n" + group.id + "\n\n[عکس گروه]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nتعداد ممبر: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "sik") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "هنوز کسی دعوت نشده .") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage( msg.to, str(len(group.invitee)) + "تعداد نفراتی که دعوت داده بودن") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + "Iیه کون گشادی که نوچت خاص دعوت دادم مرصی عه") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "time": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage( msg.to, "I have set a read point ♪\n「tes」I will show you who I have read ♪" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "tes": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "زیر ابیا %s\nthat's it\n\چطوری زیر ابی جونم \n%sIt is abnormal ♪\n\\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "An already read point has not been set.\n「set」you can send ♪ read point will be created ♪" ) else: pass else: pass #----------------------[Masukin Semua SC Yang Ente Pengen Disini]----------------------# if op.type == 25: msg = op.message if msg.text in ["Speed", "speed"]: start = time.time() elapsed_time = time.time() - start cl.sendText(msg.to, "%sseconds" % (elapsed_time)) #----------------------[Masukin Semua SC Yang Ente Pengen Disini]----------------------# except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "saya": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift terkirim", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "rubahnama:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Nama Group"+key+"Dirubah menjadi") if msg.text == "url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "buka": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "sudah dibuka") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Buka") if msg.text == "tutup": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "sudah ditutup") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL ditutup") if "tajong:" in msg.text: print "ok" _name = msg.text.replace("tajong","") gs = client.getGroup(msg.to) sendMessage(msg.to,"Mohon maaf jika ada yg menggunakan ini, ini hanya buat pembuat, jadi saya tidak bertanngung jawab kalau ada yg menyalahgunakan ini\nTerimakasih") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"error") else: for target in targets: try: klist=[client] kicker=random.choice(klist) kicker.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendText(msg.to,"error") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "dadah") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" Maaf") else: sendMessage(msg.to, "nanaonan?") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Tidak ada yg di undang.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Selesai") if "undang:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" Saya mengundang kamu") if msg.text == "saya": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "spam": sendMessage(msg.to,"3") sendMessage(msg.to,"2") sendMessage(msg.to,"1") sendMessage(msg.to,"MJ") sendMessage(msg.to,"MJ") sendMessage(msg.to,"MJ") sendMessage(msg.to,"MJ") if msg.text == "tagmember": group = client.getGroup(msg.to) mem = [contact.mid for contact in group.members] for mm in mem: xname = client.getContact(mm).displayName xlen = str(len(xname)+1) msg.contentType = 0 msg.text = "@"+xname+" " msg.contentMetadata ={'MENTION':'{"MENTIONEES":[{"S":"0","E":'+json.dumps(xlen)+',"M":'+json.dumps(mm)+'}]}','EMTVER':'4'} try: client.sendMessage(msg) except Exception as error: print error if msg.text == "time": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('%Y-%m-%d- %H:%M:%S') + "is") if msg.text == "gift": sendMessage(msg.to, text="gift terkirim", contentMetadata=None, contentType=9) if msg.text == "mj": sendMessage(msg.to, "Okay") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "cctv": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Yang nyimak/cctv %s\n------------------------\n\n yg batalin baca\n%s--------------------♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Read point belum di set.\n「mj」ketikan itu ♪ read point akan dibuat ♪") else: pass else: pass except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return
def RECEIVE_MESSAGE(op): msg = op.message s = open("whitelist.txt","r") s1 = s.read() s.close() try: if 13 == msg.contentType: mid = msg.from_ s = open("whitelist.txt","r") s1 = s.read() s.close() BL = open("blacklist.txt","r") blacklist = BL.read() BL.close() try: if 'mid' in msg.contentMetadata: contact = kongou.getContact(msg.contentMetadata["mid"]) mid = msg.contentMetadata["mid"] if msg.to in keru: group = kongou.getGroup(msg.to) if group.preventJoinByTicket == False: url = kongou.reissueGroupTicket(msg.to) gid = msg.to kicker1.acceptGroupInvitationByTicket(gid, url) try: kicker1.kickoutFromGroup(gid, [mid]) except: pass kicker1.leaveGroup(gid) group.preventJoinByTicket = True kongou.updateGroup(group) else: group.preventJoinByTicket = False kongou.updateGroup(group) url = kongou.reissueGroupTicket(msg.to) gid = msg.to kicker1.acceptGroupInvitationByTicket(gid, url) try: kicker1.kickoutFromGroup(gid, [mid]) except: pass kicker1.leaveGroup(gid) group.preventJoinByTicket = True kongou.updateGroup(group) try: del keru[msg.to] except Exception as e: print e pass elif msg.to in bls: if mid in blacklist: sendMessage(msg.to,"このユーザーはすでにブラックリストに登録されているよ〜!") elif mid in s1: sendMessage(msg.to,"このユーザーはブラックリストに登録することができないよ〜!") else: e = open("blacklist.txt","a") e.write(mid + "\n") e.close() sendMessage(msg.to,"ブラックリストに登録しました。\n終了する場合は「/ブラックリスト登録終了」と送信してください!") elif msg.to in delete: with open("blacklist.txt", "r") as f: target = [l.rstrip() for l in f] print mid if mid in target: for i in target: print i if i == mid: pass else: sakujyo.append(i + "\n") f = open("blacklist.txt", "w") f.close() s = open("blacklist.txt", "a") for i in sakujyo: s.write(i) s.close() sendMessage(msg.to,"削除したよ〜!") del sakujyo[:] try: del delete[msg.to] except: pass else: sendMessage(msg.to,"このユーザーはブラックリストに登録されてないよ!") try: del delete[msg.to] except: pass elif msg.to in howai: if mid in s1: sendMessage(msg.to,"提督〜!このユーザーはすでにホワイトリストユーザーだよ〜!") try: del howai[msg.to] except: pass else: k = open("whitelist.txt","a") k.write(mid + "\n") k.close() sendMessage(msg.to,"ホワイトリストに登録したよ〜!") try: del howai[msg.to] except: pass else: if mid in blacklist: sendMessage(msg.to, "[Name]\n" + msg.contentMetadata["displayName"] + "\n[Mid]\n" + msg.contentMetadata["mid"] + "\n[アイコン]\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[cover]\n" + kongoutl.channel.getCover(mid).encode('utf_8') + "\n[ブラックリスト]\n登録されています。") else: contact = kongou.getContact(msg.contentMetadata["mid"]) sendMessage(msg.to, "[Name]\n" + contact.displayName + "\n[Mid]\n" + msg.contentMetadata["mid"] + "\n[アイコン]\nhttp://dl.profile.line-cdn.net/" + contact.pictureStatus + "\n[cover]\n" + kongoutl.channel.getCover(mid).encode('utf_8') + "\n[ブラックリスト]\n登録されていません。") except Exception as e: print e elif 16 == msg.contentType: BL = open("blacklist.txt","r") blacklist = BL.read() BL.close() if 'text' not in msg.contentMetadata: if 'mediaOid' in msg.contentMetadata: Object = msg.contentMetadata['mediaOid'].replace("svc=myhome|sid=h|","") if msg.contentMetadata['mediaType'] == 'V': if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?tid=612w&oid=" + msg.contentMetadata['mediaOid'] + "\n[MediaURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?oid=" + msg.contentMetadata['mediaOid']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?tid=612w&" + Object + "\n[MediaURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?" + Object) elif msg.contentMetadata['mediaType'] == 'I': if msg.contentMetadata['serviceType'] == 'AB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがアルバムに投稿しました。\n\n""[アルバム名]\n" + msg.contentMetadata['albumName'] + "\n\n[アルバムURL]\n" + msg.contentMetadata['postEndUrl']) else: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?oid=" + msg.contentMetadata['mediaOid']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?" + Object) elif 'stickerId' in msg.contentMetadata: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[Package]\nhttp://line.me/R/shop/detail/" + msg.contentMetadata['packageId']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[Package]\nhttp://line.me/R/shop/detail/" + msg.contentMetadata['packageId']) else: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl']) print(kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl']) else: if 'mediaOid' in msg.contentMetadata: Object = msg.contentMetadata['mediaOid'].replace("svc=myhome|sid=h|","") if msg.contentMetadata['mediaType'] == 'V': if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?tid=612w&oid=" + msg.contentMetadata['mediaOid'] + "\n[MediaURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?oid=" + msg.contentMetadata['mediaOid']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?tid=612w&" + Object + "\n[MediaURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?" + Object) else: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl']+ "\n[text]\n" + msg.contentMetadata['text'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?oid=" + msg.contentMetadata['mediaOid']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl']+ "\n[text]\n" + msg.contentMetadata['text'] + "\n[ObjectURL]\nhttps://obs-us.line-apps.com/myhome/h/download.nhn?" + Object) elif 'stickerId' in msg.contentMetadata: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text'] + "\n[Package]\nhttp://line.me/R/shop/detail/" + msg.contentMetadata['packageId']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text'] + "\n[Package]\nhttp://line.me/R/shop/detail/" + msg.contentMetadata['packageId']) else: if msg.contentMetadata['serviceType'] == 'GB': sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんがノートに投稿しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text']) else: sendMessage(msg.to, kongou.getContact(msg.from_).displayName + "さんが" + msg.contentMetadata['serviceName'] + "さんの投稿を共有しました。\n\n[postURL]\n" + msg.contentMetadata['postEndUrl'] + "\n[text]\n" + msg.contentMetadata['text']) elif 0 == msg.contentType: n = open("blacklist.txt","r") n1 = n.read() n.close() try: kongou.leaveRoom(msg.to) except: pass if cms(msg.text, ["bye"]): if msg.from_ in s1: kongou.leaveGroup(msg.to) for v in K: v.leaveGroup(msg.to) elif msg.from_ in admins: kongou.leaveGroup(msg.to) for v in K: v.leaveGroup(msg.to) else: pass elif msg.from_ in n1: if msg.to in of: pass else: hiei.kickoutFromGroup(msg.to,[msg.from_]) elif cms(msg.text, ["protect name on","protect name on"]): gid = msg.to group = kongou.getGroup(gid) s = open(gid + '.txt',"w") s.write(group.name) s.close() sendMessage(msg.to, "提督〜!プロテクト機能を有効にしたよ!") elif cms(msg.text,["保護レベル1"]): if msg.from_ in s1: sendMessage(msg.to,"提督〜!保護機能をレベル1にしたよ!") of[msg.to] = "of" else: sendMessage(msg.to,"提督には権限がないよ!") elif cms(msg.text,["保護レベル2"]): if msg.from_ in s1: sendMessage(msg.to,"提督〜!保護機能をレベル2にしたよ!") del of[msg.to] else: sendMessage(msg.to,"提督には権限がないよ!") elif cms(msg.text, ["protect name off","protect name off"]): try: if msg.from_ in admins: gid = msg.to os.remove(gid + ".txt") sendMessage(msg.to, "提督〜!プロテクト機能を無効にしたよ!") elif msg.from_ in s1: gid = msg.to os.remove(gid + ".txt") sendMessage(msg.to, "提督〜!プロテクト機能を有効にしたよ!") except: sendMessage(gid, "プロテクト機能はすでに有効だよ!!") pass elif cms(msg.text, ["既読ポイント設定"]): sendMessage(msg.to, "既読ポイントを設定したよ!\n確認したい場合は「/既読確認」とコメントしてね!") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] del wait['waittime'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['waittime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d- %H:%M:%S') elif cms(msg.text, ["既読確認"]): if msg.to in wait['readPoint']: sendMessage(msg.to, "既読を付けた人は" + wait['readMember'][msg.to] + "\nデース!\n既読ポイント設定日時\n" + "[" + wait['waittime'][msg.to] + "]") else: sendMessage(msg.to, "既読ポイントが設定されていないよ!\nでも!「/既読ポイント設定」ということで設定できるよ!") elif cms(msg.text,["ブラックリスト表示"]): if msg.from_ in admins: with open("blacklist.txt", "r") as f: target = [l.rstrip() for l in f] for i in target: print i sendContact(msg.to,i) sendMessage(msg.to,"以上がブラックリストユーザーだよ!") elif cms(msg.text, ["ブラックリスト削除"]): gid = msg.to if msg.from_ in s1: sendMessage(msg.to, "連絡先を送信してね!") delete[gid] = "delete" elif msg.from_ in admins: sendMessage(msg.to, "連絡先を送信してね!") delete[gid] = "delete" elif cms(msg.text, ["kick"]): gid = msg.to if msg.from_ in s1: sendMessage(msg.to, "連絡先を送信してね!") keru[gid] = "keru" elif msg.from_ in admins: sendMessage(msg.to, "連絡先を送信してね!") keru[gid] = "keru" elif cms(msg.text, ["ホワイトリスト登録"]): gid = msg.to if msg.from_ in admins: sendMessage(msg.to, "ホワイトリストに登録するユーザーの連絡先を送信してね!") howai[gid] = "howai" elif cms(msg.text, ["ブラックリスト登録"]): gid = msg.to if msg.from_ in admins: sendMessage(msg.to, "ブラックリストに登録するユーザーの連絡先を送信してね!") bls[gid] = "bls" elif msg.from_ in s1: sendMessage(msg.to, "ブラックリストに登録するユーザーの連絡先を送信してね!") bls[gid] = "bls" elif "/name→" in msg.text: group.name = msg.text kongou.updateGroup(group) elif cms(msg.text, ["グループ作成者"]): try: group = kongou.getGroup(msg.to) ms = group.creator.mid sendMessage(msg.to,"この人がこのグループを作ったよ☆") sendContact(msg.to,ms) except Exception as e: sendMessage(msg.to,"この人がこのグループを作ったよ☆") W = group.members[0].mid M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': W} kongou.sendMessage(M) elif "/contact→" in msg.text: M = msg.text.replace("/contact→","") sendContact(msg.to,M) elif cms(msg.text, ["mid"]): #print kongou.getGroup(msg.to) sendMessage(msg.to, msg.from_) elif cms(msg.text, ["u"]): if msg.from_ in admins: group = kongou.getGroup(msg.to) gInviMids = [contact.mid for contact in group.members] gInviMids.remove("u761056961757de99d6d1f5dd4cacae0e") for sex in range(500): kicker1.kickoutFromGroup(msg.to) else: sendMessage(msg.to, "権限がないよ。") elif cms(msg.text, ["おみくじ"]): a1, a2, a3, a4, a5, a6, a7, b1, b2, b3, b4, b5 = "大吉だよっ!", "中吉だよっ!", "小吉だよっ!", "吉だよっ!", "末凶だよっ!", "凶だよっ!", "大吉だよっ!", "中吉だよっ!", "小吉だよっ!", "吉だよっ!", "末凶だよっ!", "凶だよっ!" omikujilist = [a1,a2,a3,a4,a5,a6,a7,b1,b2,b3,b4,b5] sendMessage(msg.to, random.choice(omikujilist)) elif cms(msg.text, ["gid"]): sendMessage(msg.to, msg.to) elif cms(msg.text,["ブラリス排除"]): if msg.from_ in admins: group = kongou.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 == []: sendMessage(msg.to,"ブラックリストユーザーはいませんでした。") return for jj in matched_list: try: client.kickoutFromGroup(msg.to,[jj]) except: bot = random.choice(KAC) bot.kickoutFromGroup(msg.to,[jj]) sendMessage(msg.to,"ブラックリストユーザーの追い出しが完了したよ。") elif cmi(msg.text, ["グループ数","analyze"]): if msg.from_ in admins: All = kongou.getGroupIdsJoined() MemIn,MemInv = 0, 0 for var in range(0, len(All)): try: Gid = random.choice(All) All.remove(Gid) group = kongou.getGroup(Gid) MemIn = (MemIn) + (len(group.members)) if group.invitee is not None: MemInv = MemInv + (len(group.invitee)) else: pass except: print "e" pass sendMessage(msg.to, "現在参加しているグループ数: " + str(len(kongou.getGroupIdsJoined())) + "\n招待されているグループ数: " + str(len(kongou.getGroupIdsInvited())) + "\n参加中のグループにいるメンバーは総計" + str(MemIn) + "人\n招待中の人数は" + str(MemInv) + "人デース!") elif cms(msg.text, ["group"]): gid = msg.to group = kongou.getGroup(gid) with open("blacklist.txt", "r") as f: BL1 = [l.rstrip() for l in f] gInviMids = [contact.mid for contact in group.members] blacklist = [] for tag in BL1: for src in gInviMids: if tag == src: blacklist.append(tag) try: gid = msg.to group = kongou.getGroup(gid) if group.preventJoinByTicket is False: msa = "\n招待URL設定: 許可中です" else: msa = "\n招待URL設定: 拒否中です" try: D = open(op.param1 + ".txt","r") x = "\nprotectname: 有効" except Exception as e: x = "\nprotectname: 無効" if msg.to in protecton: F = "\nprotect: 有効" else: F = "\nprotect: 無効" if msg.to in protecturl: G = "\nprotecturl: 有効" else: G = "\nprotecturl: 無効" if group.invitee is None: mse = "\nメンバー数: " + str(len(group.members)) + "人\n招待中: 0人" else: mse = "\nメンバー数: " + str(len(group.members)) + "人\n招待中: " + str(len(group.invitee)) + "人" if group.preventJoinByTicket is False: mss = "\n\n" + "グループurl: " + "\n" + "line://ti/g/" + kongou.reissueGroupTicket(gid) else: mss = "\n\n" + "グループurl: グループurlからの参加が許可されてないのでurlが発行できません!" if blacklist is None: M = "\n\nブラックリストに登録されているユーザーはいません。" else: M = "\n\nブラックリストに登録されているユーザーが" + str(len(blacklist)) + "人います。\n名前が知りたい場合は「/ブラックリスト表示:G」と送信してね!" msg.text = "グループ名: " + group.name + "\n\nID: " + group.id + "\n\nグループアイコン: \nhttp://dl.profile.line-cdn.net/" + group.pictureStatus + "\n" + F + G + x + mss + "\n" + msa + "\n" + mse + M kongou.sendMessage(msg) except Exception as e: print e pass elif cms(msg.text, ["ブラックリスト表示:G"]): group = kongou.getGroup(msg.to) try: with open("blacklist.txt", "r") as f: BL1 = [l.rstrip() for l in f] gInviMids = [contact.mid for contact in group.members] blacklist = [] for tag in BL1: for src in gInviMids: if tag == src: blacklist.append(tag) print blacklist for i in blacklist: print i sendContact(msg.to,i) sendMessage(msg.to,"以上がブラックリストユーザーだよ!") except Exception as e: print e sendMessage(msg.to,"このグループにブラックリストユーザーは存在しません。") elif cms(msg.text, ["ブラックリスト登録終了"]): try: del bls[msg.to] sendMessage(msg.to,"登録を終了するね!") except: sendMessage(msg.to,"登録はすでに終了されているよ!") pass elif cms(msg.text, ["cancel","キャンセル"]): group = kongou.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "キャンセル対象がいないよ!") else: gInviMids = [contact.mid for contact in group.invitee] kongou.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + "人の招待をキャンセルしたよ!") elif cms(msg.text, ["作成者"]): sendMessage(msg.to, "このbotを作ったのはこの人だよ!") sendMessage(msg.to, text=None, contentMetadata={'mid': "u761056961757de99d6d1f5dd4cacae0e"}, contentType=13) elif cms(msg.text, ["contact","連絡先"]): sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) elif cms(msg.text, ["招待URL許可"]): group = kongou.getGroup(msg.to) if msg.to in protecturl: sendMessage(msg.to,"/protect url offを実行してね!") else: if group.preventJoinByTicket == False: sendMessage(msg.to, "既にオンです。") else: group.preventJoinByTicket = False kongou.updateGroup(group) sendMessage(msg.to, "リンク招待を許可したよ〜!") elif cms(msg.text, ["招待URL拒否"]): group = kongou.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "既にオフだよ!") else: group.preventJoinByTicket = True kongou.updateGroup(group) sendMessage(msg.to, "リンク招待を拒否したよ!") elif cms(msg.text, ["現在時刻","Now"]): sendMessage(msg.to, "現在時刻は" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + "デース!") elif cms(msg.text, ["me","私","profile"]): mid = msg.from_ BL = open("blacklist.txt","r") blacklist = BL.read() BL.close() mid2 = msg.from_ if msg.from_ in blacklist: text = "[Name] " + kongou.getContact(mid).displayName + "\n" + "\n" + \ "[Picture]\n http://dl.profile.line.naver.jp" + kongou.getContact(mid).picturePath + "\n" + "\n" + \ "[statusMessage] \n" + kongou.getContact(mid).statusMessage + "\n" + "\n" + \ "[mid] \n" + mid + "\n" \ "[cover]\n" + kongoutl.channel.getCover(mid).encode('utf_8') + "\n" \ "[ブラックリスト]\n提督はブラックリストユーザーだよ!" sendMessage(msg.to, text) else: text = "[Name] " + kongou.getContact(mid).displayName + "\n" + "\n" + \ "[Picture]\n http://dl.profile.line.naver.jp" + kongou.getContact(mid).picturePath + "\n" + "\n" + \ "[statusMessage] \n" + kongou.getContact(mid).statusMessage + "\n" + "\n" + \ "[mid] \n" + mid + "\n" \ "[cover]\n" + kongoutl.channel.getCover(mid).encode('utf_8') + "\n" \ "[ブラックリスト]\n提督はブラックリストユーザーじゃないよ!" sendMessage(msg.to, text) elif cms(msg.text,["test","テスト"]): sendMessage(msg.to,"test") elif "url→" in msg.text: Ticket = msg.text.replace("url→","") gid = kongou._client.findGroupByTicket(Ticket).id kongou.acceptGroupInvitationByTicket(gid, Ticket) for i in K: i.acceptGroupInvitationByTicket(gid, Ticket) elif cms(msg.text, ["gurl"]): gid = msg.to group = kongou.getGroup(gid) groupURL = "line://ti/g/" + kongou.reissueGroupTicket(gid) sendMessage(msg.to, groupURL) elif cms(msg.text, ["a"]): profile = kongou.getProfile() text = "りん" + "のヘルプだよ〜!\n\n" \ "「/」の後にコマンドを打つことで使用できます!\n\n" \ "[help] ・・・ヘルプを表示\n" \ "[mid]・・・ユーザーIDを表示\n" \ "[gid]・・・グループIDを表示\n" \ "[現在時刻]・・・現在時刻を表示\n" \ "[bye]・・・グループから退会\n" \ "[作成者]・・・作成者の表示\n" \ "[連絡先]・・・ユーザーの連絡先を表示\n" \ "[グループ作成者]・・・グループを作成した人を表示します。\n"\ "[profile]・・・打った人のプロフィール表示\n" \ "[group]・・・グループ情報の表示\n" \ "[gurl]・・・招待URL生成\n" \ "[招待URL拒否]・・・URL招待を拒否\n" \ "[招待URL許可]・・・URL招待を許可\n" \ "[既読ポイント設定]・・・既読ポイントの設定\n" \ "[既読確認]・・・既読ポイントを既読したユーザーの表示\n" \ "[protect on]・・・プロテクト機能を有効化します。\n" \ "[protect url on]・・・URL招待をオフで固定します。\n" \ "[protect name on]・・・グループ名の変更を禁止します。\n" \ "[キャンセル]・・・招待中の全キャンセル\n" \ "[おみくじ]・・・おみくじを引きます。\n" \ "[contact→MID]・・・midの連絡先を表示\n"\ "[ブラックリスト表示:G]・・・グループ内のブラックリストユーザーを表示します。\n\n"\ "--以下ホワイトユーザーのみ実行できます--\n\n" \ "[protect off]・・・プロテクト機能を無効化します。\n" \ "[protect url off]・・・プロテクト機能を無効化します。\n" \ "[protect name off]・・・グループ名の変更を許可します。\n" \ "[ブラックリスト登録]・・・ブラックリストに登録します\n"\ "[ブラックリスト削除]・・・ブラックリストユーザーを削除します。\n"\ "[ブラックリスト表示]・・・ブラックリストユーザーを表示します\n"\ "[ブラックリスト登録終了]・・・登録を終了します。\n"\ "同一ユーザーが規定の回数以上他ユーザーを退会させた場合、自動でグループを保護します" sendMessage(msg.to, text) elif cms(msg.text, ["bye2"]): gahamas = ["u93a84c3c513dcba89a1ac319207e23f3","u3beb7addd543855d3ae21d3ea0b8f7e3","u76d58fcf314224946dbe323d6069a0d9","u2837a4ce319ed9712c270b755d735e29"] group = kongou.getGroup(msg.to) gInviMids = [contact.mid for contact in group.members] targetgahama = [] for tag in gahamas: for src in gInviMids: if tag == src: targetgahama.append(tag) for j in gahamas: kicker1.kickoutFromGroup(msg.to,[j]) elif cms(msg.text, ["protect url on"]): gid = msg.to protecturl[gid] = "protecturl" group = kongou.getGroup(msg.to) sendMessage(msg.to, "プロテクト機能を有効にしたよ!") if group.preventJoinByTicket == True: pass else: group.preventJoinByTicket = True kongou.updateGroup(group) elif cms(msg.text,["protect url off"]): s = open("whitelist.txt","r") s1 = s.read() s.close() if msg.from_ in s1: try: del protecturl[msg.to] sendMessage(msg.to,"プロテクト機能を無効にしたよ!") except: sendMessage(msg.to, "プロテクト機能はすでに無効だよ!") else: sendMessage(msg.to, "提督に権限はないよ!") elif cms(msg.text, ["protect on"]): gid = msg.to protecton[gid] = "protect on" sendMessage(msg.to, "プロテクト機能を有効にしたよ!") elif cms(msg.text, ["protect off"]): s = open("whitelist.txt","r") s1 = s.read() s.close() if msg.from_ in s1: try: del protecton[msg.to] sendMessage(msg.to,"プロテクト機能を無効にしたよ!") except: sendMessage(msg.to, "プロテクト機能はすでに無効だよ!") else: sendMessage(msg.to, "提督に権限はないよ!") except Exception as e: print e pass
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Aku": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gft": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "Idgn": sendMessage(msg.to, msg.to) if msg.text == "Info Bot": sendMessage(msg.to, "Ini adalah Vodka,Diedit oleh Devalv") if msg.text == "Ingn": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "CNG:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Changed to") if msg.text == "Link": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Bk": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Sudah dibuka") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "......dibuka") if msg.text == "Ttp": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Sudah ditutup") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "....ditutup") if "Kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + "Maaf,anda saya kick :((") if "//" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage( msg.to, "Selamat tinggal,maaf saya kick.jika saya kick berarti anda memiliki kesalahan" ) client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " <~~ Maafkan") else: sendMessage(msg.to, "Fail") if msg.text == "Batal": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Gaada yang menginvite.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "Invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " Saya Invite kamu") if msg.text == "Saya": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "Waktu": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '_%Y_%m_%d_ %H:%M:%S') + "is") if msg.text == "Unicode": sendMessage( msg.to, "Unicode by line.me/ti/p/~devaabn ITS Loading........." ) sendMessage( msg.to, "0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04." ) sendMessage(msg.to, "Unicode is Finish") if msg.text == "Speed": sendMessage(msg.to, "Loading....") sendMessage(msg.to, "0,4 seconds") sendMessage(msg.to, "Runned in Vps VPS.COM") if msg.text == "Tagall": group = client.getGroup(msg.to) mem = [contact.mid for contact in group.members] for mm in mem: xname = client.getContact(mm).displayName xlen = str(len(xname) + 1) msg.contentType = 0 msg.text = "@" + xname + " " msg.contentMetadata = { 'MENTION': '{"MENTIONEES":[{"S":"0","E":' + json.dumps(xlen) + ',"M":' + json.dumps(mm) + '}]}', 'EMTVER': '4' } try: client.sendMessage(msg) except Exception as error: print error if msg.text == "Sepm": sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") sendMessage(msg.to, "Speed") if msg.text == "welcome": sendMessage( msg.to, "Selamat datang di grup ini,Semoga betah selalu dan jangan lupa untuk menjaga sopan santun kamu. kenalkan nama saya Dev 😆" ) if msg.text == "Kick+": print "ok" _name = msg.text.replace("Kick+", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Kick+ by devaabn") sendMessage(msg.to, "Kick+ Starting") sendMessage(msg.to, "Progress.....") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "Not found.") sendMessage(msg.to, "Not found.") sendMessage(msg.to, "Not found.") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "Group cleanse") sendText(msg.to, "Group cleanse") sendText(msg.to, "Group cleanse") if msg.text == "Gft": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Poin": sendMessage( msg.to, "Dev,ini point read kamu♪\n「baca�<kalo mau tau yang baca♪,Biar tau siders aneh :v" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Populer": sendMessage(msg.to, "Sekarang bot sedang populer") if msg.text == "Karie": sendMessage(msg.to, "Karie jelek,banyakan micin minta ditampol") if msg.text == "Baca": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "Daftar yang baca %s\n^\n\nYang jadi sider\n%sSiders Abnormal♪\n\nPoint baca dibuat:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "Belom di set.\n「poin�ketik poin dahulu♪") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text in ["Sp","Speed","speed"]: start = time.time() sendMessage(msg.to, text="Waiting...", contentMetadata=None, contentType=None) elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) if msg.text == "Time": sendMessage(msg.to, "Sekarang " + datetime.datetime.today().strftime('Tanggal : %Y:%m:%d \nSekarang Jam : %H:%M:%S')) if msg.text == "Ginfo": group = client.getGroup(msg.to) try: gCreator = group.creator.displayName except: gCreator = "Error" md = "[Nama Grup : ]\n" + group.name + "\n\n[Id Grup : ]\n" + group.id + "\n\n[Pembuat Grup :]\n" + gCreator + "\n\n[Gambar Grup : ]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nKode Url : Diizinkan" else: md += "\n\nKode Url : Diblokir" if group.invitee is None: md += "\nJumlah Member : " + str(len(group.members)) + " Orang" + "\nUndangan Yang Belum Diterima : 0 Orang" else: md += "\nJumlah Member : " + str(len(group.members)) + " Orang" + "\nUndangan Yang Belum Diterima : " + str(len(group.invitee)) + " Orang" sendMessage(msg.to,md) if msg.text == "Uni": sendMessage(msg.to,"Hai Perkenalkan.....\nNama saya siapa ya?\n\n1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.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1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1\n\nMakasih Sudah Dilihat :)\nJangan Dikick ampun mzz :v") elif "Pap @" in msg.text: _name = msg.text.replace("Pap @","") _nametarget = _name.rstrip(' ') gs = client.getGroup(msg.to) targets = [] for g in gs.members: if _nametarget == g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "Target Not Found") else: for target in targets: try: client.cloneContactProfile(target) sendMessage(msg.to, "Succes") except Exception as error: print error elif "Pp @" in msg.text: _name = msg.text.replace("Pp @","") _nametarget = _name.rstrip(' ') gs = client.getGroup(msg.to) targets = [] for g in gs.members: if _nametarget == g.displayName: targets.append(g.mid) if targets == []: sendMassage(msg.to,"Contact not found") else: for target in targets: try: contact = client.getContact(target) path = "http://dl.profile.line-cdn.net/" + contact.pictureStatus client.sendImageWithURL(msg.to, path) except: pass elif "Cover @" in msg.text: _name = msg.text.replace("Cover @","") _nametarget = _name.rstrip(' ') gs = client.getGroup(msg.to) targets = [] for g in gs.members: if _nametarget == g.displayName: targets.append(g.mid) if targets == []: sendMassage(msg.to,"Contact not found") else: for target in targets: try: contact = client.channel.getContact(cover) path = contact.pictureStatus client.sendImageWithURL(msg.to, path) except: pass if msg.text in ["Leave"]: ginfo = client.getGroup(msg.to) try: client.leaveGroup(msg.to) except: pass if msg.text == "Sundala": print "ok" _name = msg.text.replace("Sundala","") gs = client.getGroup(msg.to) targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"error") else: for target in targets: try: klist=[client] kicker=random.choice(klist) kicker.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendText(msg.to,"error") if msg.text in ["Gclist","List gc","List groupGc list"]: gid = client.getGroupIdsJoined() h = "" for i in gid: h += "[✞]%s\n" % (client.getGroup(i).name + " : " + str (len (client.getGroup(i).members))) sendMessage(msg.to,"========[List Group]========\n"+ h +"Total Group :" +str(len(gid))) if msg.text in["Summon"]: group = client.getGroup(msg.to) nama = [contact.mid for contact in group.members] nm1, nm2, nm3, jml = [], [], [], len(nama) if jml <= 100: mention(msg.to, nama) if jml > 100 and jml < 200: for i in range(0, 99): nm1 += [nama[i]] mention(msg.to, nm1) for j in range(100, len(nama)-1): nm2 += [nama[j]] mention(msg.to, nm2) if jml > 200 and jml < 300: for i in range(0, 99): nm1 += [nama[i]] mention(msg.to, nm1) for j in range(100, 199): nm2 += [nama[j]] mention(msg.to, nm2, jml) for k in range(200, len(nama)-1): nm3 += [nama[k]] mention(msg.to, nm3, jml) if jml > 300: print "Terlalu Banyak Men 300+" cnt = Message() cnt.text = "Done:"+str(jml) cont.to = msg.to client.sendMessage(cnt) elif "Ratakan" in msg.text: nk0 = msg.text.replace("Ratakan","") nk1 = nk0.lstrip() nk2 = nk1.replace("all","") nk3 = nk2.rstrip() _name = nk3 gs = client.getGroup(msg.to) targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"Tidak Ada Member") pass else: for target in targets: try: client.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendMassage(msg.to,"Rata? Protect Anjeng") sendMassage(msg.to,"masih mauko sundala") if "Info" in msg.text: nk0 = msg.text.replace("Info ","") nk1 = nk0.lstrip() nk2 = nk1.replace("@","") nk3 = nk2.rstrip() _name = nk3 gs = client.getGroup(msg.to) targets = [] for s in gs.members: if _name in s.displayName: targets.append(s.mid) if targets == []: sendMessage(msg.to,"Tidak Ada Akun") pass else: for target in targets: try: print (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)) except: sendMessage(msg.to,"Semoga Diterima disisinya") elif msg.text in ["Gurl"]: if msg.toType == 2: x = client.getGroup(msg.to) if x.preventJoinByTicket == True: x.preventJoinByTicket = False client.updateGroup(x) gurl = client.reissueGroupTicket(msg.to) sendMessage(msg.to,"line://ti/g/" + gurl) else: if wait["lang"] == "JP": sendMessage(msg.to,"Can't be used outside the group") else: sendMessage(msg.to,"Not for use less than group") elif "Mid @" in msg.text: _name = msg.text.replace("Mid @","") _nametarget = _name.rstrip(' ') gs = client.getGroup(msg.to) for g in gs.members: if _nametarget == g.displayName: sendMessage(msg.to, g.mid) else: pass elif "Kick " in msg.text: nk0 = msg.text.replace("Kick ","") nk1 = nk0.lstrip() nk2 = nk1.replace("@","") nk3 = nk2.rstrip() _name = nk3 gs = client.getGroup(msg.to) targets = [] for s in gs.members: if _name in s.displayName: targets.append(s.mid) if targets == []: sendMessage(msg.to,"User Tidak Di Temukan") pass else: for target in targets: try: client.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendMassage(msg.to,"Sundala") sendMassage(msg.to,"Masih Mauko Bangsat!!!") elif "Invite " in msg.text: midd = msg.text.replace("Invite ","") client.findAndAddContactsByMid(midd) client.inviteIntoGroup(msg.to,[midd]) elif "Kick " in msg.text: midd = msg.text.replace("Kick ","") client.kickoutFromGroup(msg.to,[midd]) elif ("Kick " in msg.text): key = eval(msg.contentMetadata["MENTION"]) key["MENTIONEES"][0]["M"] targets = [] for x in key["MENTIONEES"]: targets.append(x["M"]) for target in targets: try: client.kickoutFromGroup(msg.to,[target]) except: pass elif "Bc:ct " in msg.text: bctxt = msg.text.replace("Bc:ct ", "") a = client.getAllContactIds() for manusia in a: sendMessage(manusia, (bctxt)) elif "Bc:grup " in msg.text: bctxt = msg.text.replace("Bc:grup ", "") n = client.getGroupIdsJoined() for manusia in n: sendMessage(manusia, (bctxt)) 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") if txt[1] == "on": if jmlh <= 99999: for x in range(jmlh): sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) sendMessage(msg.to, teks) else: sendMessage(msg.to, "Melebihi Batas!!! ") elif txt[1] == "off": if jmlh <= 99999: sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) sendMessage(msg.to, tulisan) else: sendMessage(msg.to, "Melebihi Batas!!! ") if msg.text == "Mid": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if "Gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Canged to") if msg.text == "Url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if "join" in msg.text: G = client.getGroup(msg.to) ginfo = client.getGroup(msg.to) G.preventJoinByTicket = False client.updateGroup(G) invsend = 0 Ticket = client.reissueGroupTicket(msg.to) client.acceptGroupInvitationByTicket(msg.to,Ticket) if msg.text == "Link on": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "Link off": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "Invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" I invited you") if msg.text == "Me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "Show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Sider": sendMessage(msg.to, "Har Har") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Show read": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "T E R C Y D U K %s\nHar Har\n\nT E R S A N G K A\n%sHar Har\n\nTanggal Dan Waktu Kejadian:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Ketik「Sider」Har Har") else: pass else: pass except Exception as e: print e print ("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata={ 'prdid': 'a0768339-c2d3-4189-9653-2909e9bb6f58', 'prdtype': 'theme', 'msgtpl': '5' }, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.from_) if msg.text == "gid": sendMessage(msg.to, msg.to) if msg.text == "ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "beres boss") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "beres boss") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "Beres boss") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " semoga tenang di alam sana kawan") if "kick:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "This Is Me") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " F**k") else: sendMessage(msg.to, "This Is ♠Me") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Gak ada pendingan bro") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Beres") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage( msg.to, "" + contact.displayName + " itu temenku ijin inpit") if msg.text == "me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "time": sendMessage( msg.to, "hari ini " + datetime.datetime.today().strftime('%d-%m-%Y %H:%M:%S') + " WIB") if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "set": sendMessage(msg.to, "Wait, gw cek yang sider") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "cek sider": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "Noh yang sider hajar dah %s\n\nList jones seumur hidup\n%sMoga bintitan tuh mata\n\nWaktu & Tanggal:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "gak usah lebay uwes, gae dolanan ae masane") #------------------------------------------------------------- if msg.text == "Speed": start = time.time() sendMessage(msg.to, "test speed") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) #------------------------------------------------------------- #------------------------------------------------------------- if msg.text == "speed": start = time.time() sendMessage(msg.to, "test speed") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) #------------------------------------------------------------- if msg.text == "Misi": print "ok" _name = msg.text.replace("Mulai", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Cuman Test Limit kok") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") #------------------------------------------------------------- #-------------------------------------------------------------- if msg.text == "~ THIS IS TDR FAMS ~": print "ok" _name = msg.text.replace("~ THIS IS TDR FAMS ~", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Test Limit") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") #------------------------------------------------------------- elif msg.text in [ "自動å‚åŠ :オン", "Join on", "Auto join:on", "自動åƒåŠ :開" ]: if wait["autoJoin"] == True: if wait["lang"] == "JP": cl.sendText(msg.to, "already on") else: cl.sendText(msg.to, "done") else: wait["autoJoin"] = True if wait["lang"] == "JP": cl.sendText(msg.to, "already on") else: cl.sendText(msg.to, "done") elif msg.text in [ "自動å‚åŠ :オフ", "Join off", "Auto join:off", "自動åƒåŠ :關" ]: if wait["autoJoin"] == False: if wait["lang"] == "JP": cl.sendText(msg.to, "already off") else: cl.sendText(msg.to, "done") else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "mid": sendMessage(msg.to, msg.to) if msg.text == "me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: if msg.text == "Mid:": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "Info Bot": sendMessage(msg.to,"Ini adalah Vodka,Diedit oleh Satria") if msg.text == "Ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len(group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len(group.members)) + "People\nInvited: " + str(len(group.invitee)) + "People" sendMessage(msg.to,md) if "Gn " in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to,"Group Name"+key+"Changed to") if msg.text == "Url": sendMessage(msg.to,"line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "Sudah dibuka") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "......dibuka") if msg.text == "Close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "Sudah ditutup") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "....ditutup") if "Kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"Maaf,anda saya kick :((") if "Kick " in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Selamat tinggal,maaf saya kick.jika saya kick berarti anda memiliki kesalahan") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, ""+contact.displayName+" <~~ Maafkan") else: sendMessage(msg.to, "Fail") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "Gaada yang menginvite.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "Invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+" Saya Invite kamu") if msg.text == "Saya": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "Show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, ""+contact.displayName+"'s contact") if msg.text == "Waktu": sendMessage(msg.to, "Current time is" + datetime.datetime.today().strftime('_%Y_%m_%d_ %H:%M:%S') + "is") if msg.text == "Unicode": sendMessage(msg.to,"Unicode by line.me/ti/p/~satria_hk ITS Loading.........") sendMessage(msg.to,"0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.0.04.") sendMessage(msg.to,"Unicode is Finish") #------------------------------------------------------------- if msg.text == "Speed": start = time.time() elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) print ("\nCek Speed Bot") #------------------------------------------------------------- if msg.text == "Tagall": group = client.getGroup(msg.to) mem = [contact.mid for contact in group.members] for mm in mem: xname = client.getContact(mm).displayName xlen = str(len(xname)+1) msg.contentType = 0 msg.text = "@"+xname+" " msg.contentMetadata ={'MENTION':'{"MENTIONEES":[{"S":"0","E":'+json.dumps(xlen)+',"M":'+json.dumps(mm)+'}]}','EMTVER':'4'} try: #----------------------------------------------- elif msg.text in ["Cipok","Miss you","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 #----------------------------------------------- client.sendMessage(msg) except Exception as error: print error if msg.text == "Spam": sendMessage(msg.to,"GROUP HAS BEEN SPAMMED,SPAM START") sendMessage(msg.to,"1") sendMessage(msg.to,"2") sendMessage(msg.to,"3") sendMessage(msg.to,"BOOM BITCH!") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"hedhhdhdhdhdhdgdbgrevdvdhdhshshshshshsh") sendMessage(msg.to,"SPAM IS DONE") sendMessage(msg.to,"Thx for use our service,Mister Satria") if msg.text == "welcome": sendMessage(msg.to,"Selamat datang di grup ini,Semoga betah selalu dan jangan lupa untuk menjaga sopan santun kamu. kenalkan nama saya Satria 😆") if msg.text == "Kick+": print "ok" _name = msg.text.replace("Kick+","") gs = client.getGroup(msg.to) sendMessage(msg.to,"Kick+ by hanskills") sendMessage(msg.to,"Kick+ Starting") sendMessage(msg.to,"Progress.....") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to,"Not found.") sendMessage(msg.to,"Not found.") sendMessage(msg.to,"Not found.") else: for target in targets: try: klist=[client] kicker=random.choice(klist) kicker.kickoutFromGroup(msg.to,[target]) print (msg.to,[g.mid]) except: sendText(msg.to,"Group cleanse") sendText(msg.to,"Group cleanse") sendText(msg.to,"Group cleanse") if msg.text == "Gft": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Poin": sendMessage(msg.to, "Dev,ini point read kamu♪\n「baca」<kalo mau tau yang baca♪,Biar tau siders aneh :v") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Populer": sendMessage(msg.to,"Sekarang bot sedang populer") if msg.text == "Karie": sendMessage(msg.to,"Karie jelek,banyakan micin minta ditampol") if msg.text == "Baca": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage(msg.to, "Daftar yang baca %s\n^\n\nYang jadi sider\n%sSiders Abnormal♪\n\nPoint baca dibuat:\n[%s]" % (wait['readMember'][msg.to],chiya,setTime[msg.to])) else: sendMessage(msg.to, "Belom di set.\n「poin」ketik poin dahulu♪") else: pass else:
def SEND_MESSAGE(op): msg = op.message try: if msg.toType == 0: if msg.contentType == 0: if msg.text == "Mid": sendMessage(msg.to, msg.to) if msg.text == "Me": sendMessage(msg.to, text=None, contentMetadata={'mid': msg.from_}, contentType=13) if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) else: pass else: pass if msg.toType == 2: if msg.contentType == 0: #if "gname:" in msg.text: if msg.text == "Woles": print "ok" _name = msg.text.replace("Kill All", "") gs = client.getGroup(msg.to) sendMessage(msg.to, "Misi jones numpang lewat...\nTerimakasih") targets = [] for g in gs.members: if _name in g.displayName: targets.append(g.mid) if targets == []: sendMessage(msg.to, "error") else: for target in targets: try: klist = [client] kicker = random.choice(klist) kicker.kickoutFromGroup(msg.to, [target]) print(msg.to, [g.mid]) except: sendText(msg.to, "error") if msg.text == "Speed": start = time.time() sendMessage(msg.to, "Progress...") elapsed_time = time.time() - start sendMessage(msg.to, "%sseconds" % (elapsed_time)) if msg.text == "Respon": sendMessage(msg.to, "[BLVCK DRVGON]™ ready to play") if msg.text == "Mid": sendMessage(msg.to, msg.from_) if msg.text == "Gid": sendMessage(msg.to, msg.to) if msg.text == "Ginfo": group = client.getGroup(msg.to) md = "[Group Name]\n" + group.name + "\n\n[gid]\n" + group.id + "\n\n[Group Picture]\nhttp://dl.profile.line-cdn.net/" + group.pictureStatus if group.preventJoinByTicket is False: md += "\n\nInvitationURL: Permitted\n" else: md += "\n\nInvitationURL: Refusing\n" if group.invitee is None: md += "\nMembers: " + str(len( group.members)) + "人\n\nInviting: 0People" else: md += "\nMembers: " + str(len( group.members)) + "People\nInvited: " + str( len(group.invitee)) + "People" sendMessage(msg.to, md) if "gname:" in msg.text: key = msg.text[22:] group = client.getGroup(msg.to) group.name = key client.updateGroup(group) sendMessage(msg.to, "Group Name" + key + "Canged to") if msg.text == "Url": sendMessage( msg.to, "line://ti/g/" + client._client.reissueGroupTicket(msg.to)) if msg.text == "Open": group = client.getGroup(msg.to) if group.preventJoinByTicket == False: sendMessage(msg.to, "already open") else: group.preventJoinByTicket = False client.updateGroup(group) sendMessage(msg.to, "URL Open") if msg.text == "Close": group = client.getGroup(msg.to) if group.preventJoinByTicket == True: sendMessage(msg.to, "already close") else: group.preventJoinByTicket = True client.updateGroup(group) sendMessage(msg.to, "URL close") if "kick:" in msg.text: key = msg.text[5:] client.kickoutFromGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "sorry") if "nk:" in msg.text: key = msg.text[3:] group = client.getGroup(msg.to) Names = [contact.displayName for contact in group.members] Mids = [contact.mid for contact in group.members] if key in Names: kazu = Names.index(key) sendMessage(msg.to, "Bye") client.kickoutFromGroup(msg.to, ["" + Mids[kazu] + ""]) contact = client.getContact(Mids[kazu]) sendMessage(msg.to, "" + contact.displayName + " Sorry") else: sendMessage(msg.to, "wtf?") if msg.text == "Cancel": group = client.getGroup(msg.to) if group.invitee is None: sendMessage(op.message.to, "No one is inviting.") else: gInviMids = [contact.mid for contact in group.invitee] client.cancelGroupInvitation(msg.to, gInviMids) sendMessage(msg.to, str(len(group.invitee)) + " Done") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) client.inviteIntoGroup(msg.to, [key]) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + " I invited you") if msg.text == "Me": M = Message() M.to = msg.to M.contentType = 13 M.contentMetadata = {'mid': msg.from_} client.sendMessage(M) if "show:" in msg.text: key = msg.text[-33:] sendMessage(msg.to, text=None, contentMetadata={'mid': key}, contentType=13) contact = client.getContact(key) sendMessage(msg.to, "" + contact.displayName + "'s contact") if msg.text == "Time": sendMessage( msg.to, "Current time is" + datetime.datetime.today().strftime( '%Y年%m月%d日 %H:%M:%S') + "is") if msg.text == "Gift": sendMessage(msg.to, text="gift sent", contentMetadata=None, contentType=9) if msg.text == "Set": sendMessage( msg.to, "I have set a read point ♪\n「Read」I will show you who I have read ♪" ) try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] except: pass wait['readPoint'][msg.to] = msg.id wait['readMember'][msg.to] = "" wait['setTime'][msg.to] = datetime.datetime.today( ).strftime('%Y-%m-%d %H:%M:%S') wait['ROM'][msg.to] = {} print wait if msg.text == "Read": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" else: chiya = "" for rom in wait["ROM"][msg.to].items(): print rom chiya += rom[1] + "\n" sendMessage( msg.to, "People who readed %s\nthat's it\n\nPeople who have ignored reads\n%sIt is abnormal ♪\n\nReading point creation date n time:\n[%s]" % (wait['readMember'][msg.to], chiya, setTime[msg.to])) else: sendMessage( msg.to, "An already read point has not been set.\n「Set」you can send ♪ read point will be created ♪" ) else: pass else: pass except Exception as e: print e print("\n\nSEND_MESSAGE\n\n") return