diff --git a/vodkabot.py b/vodkabot.py index 7caf6dc..ac2d05c 100644 --- a/vodkabot.py +++ b/vodkabot.py @@ -39,7 +39,7 @@ def sendMessage(to, text, contentMetadata={}, contentType=0): def NOTIFIED_ADD_CONTACT(op): try: - sendMessage(op.param1, client.getContact(op.param1).displayName + "Thanks for add") + sendMessage(op.param1, client.getContact(op.param1).displayName + "謝謝加入~~ Thanks for add") except Exception as e: print e print ("\n\nNOTIFIED_ADD_CONTACT\n\n") @@ -50,7 +50,7 @@ def NOTIFIED_ADD_CONTACT(op): def NOTIFIED_ACCEPT_GROUP_INVITATION(op): #print op try: - sendMessage(op.param1, client.getContact(op.param2).displayName + "WELCOME to " + group.name) + sendMessage(op.param1, client.getContact(op.param2).displayName + "歡迎來到 " + group.name) except Exception as e: print e print ("\n\nNOTIFIED_ACCEPT_GROUP_INVITATION\n\n") @@ -60,7 +60,7 @@ def NOTIFIED_ACCEPT_GROUP_INVITATION(op): def NOTIFIED_KICKOUT_FROM_GROUP(op): try: - sendMessage(op.param1, client.getContact(op.param3).displayName + " Good Bye\n(*´・ω・*)") + sendMessage(op.param1, client.getContact(op.param3).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") + sendMessage(msg.to, "掰掰拉^^") client.kickoutFromGroup(msg.to, [""+Mids[kazu]+""]) contact = client.getContact(Mids[kazu]) - sendMessage(msg.to, ""+contact.displayName+" Sorry") + sendMessage(msg.to, ""+contact.displayName+" 抱歉囉><") else: - sendMessage(msg.to, "wtf?") + sendMessage(msg.to, "找不到成員><") if msg.text == "cancel": group = client.getGroup(msg.to) if group.invitee is None: - sendMessage(op.message.to, "No one is inviting.") + 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)) + " Done") + sendMessage(msg.to, str(len(group.invitee)) + " 人 已取消") if "invite:" in msg.text: key = msg.text[-33:] client.findAndAddContactsByMid(key) @@ -215,11 +215,11 @@ def SEND_MESSAGE(op): 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") + sendMessage(msg.to, "戰神報時: " + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + " ~") 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 ♪") + sendMessage(msg.to, "已抓已讀點♪") try: del wait['readPoint'][msg.to] del wait['readMember'][msg.to] @@ -230,7 +230,7 @@ def SEND_MESSAGE(op): 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.text == "read": if msg.to in wait['readPoint']: if wait["ROM"][msg.to].items() == []: chiya = "" @@ -240,9 +240,9 @@ def SEND_MESSAGE(op): 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])) + sendMessage(msg.to, "已讀的人 %s\nthat's it\n\n已讀不回的人\n%s >< ♪\n\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 ♪") + sendMessage(msg.to, "還沒抓已讀點喔♪") else: pass else: