@@ -39,7 +39,7 @@ def sendMessage(to, text, contentMetadata={}, contentType=0):
39
39
40
40
def NOTIFIED_ADD_CONTACT (op ):
41
41
try :
42
- sendMessage (op .param1 , client .getContact (op .param1 ).displayName + "謝謝加入 " )
42
+ sendMessage (op .param1 , client .getContact (op .param1 ).displayName + "Hi " )
43
43
except Exception as e :
44
44
print e
45
45
print ("\n \n NOTIFIED_ADD_CONTACT\n \n " )
@@ -60,7 +60,7 @@ def NOTIFIED_ACCEPT_GROUP_INVITATION(op):
60
60
61
61
def NOTIFIED_KICKOUT_FROM_GROUP (op ):
62
62
try :
63
- sendMessage (op .param1 , client .getContact (op .param3 ).displayName + " 被踢了呢>< " )
63
+ sendMessage (op .param1 , client .getContact (op .param3 ).displayName + " 被踢了拉 嗚嗚嗚 " )
64
64
except Exception as e :
65
65
print e
66
66
print ("\n \n NOTIFIED_KICKOUT_FROM_GROUP\n \n " )
@@ -70,7 +70,7 @@ def NOTIFIED_KICKOUT_FROM_GROUP(op):
70
70
71
71
def NOTIFIED_LEAVE_GROUP (op ):
72
72
try :
73
- sendMessage (op .param1 , client .getContact (op .param2 ).displayName + " 戦神跟你說 ByeBye \n (*´・ω・*) " )
73
+ sendMessage (op .param1 , client .getContact (op .param2 ).displayName + " 退了..... " )
74
74
except Exception as e :
75
75
print e
76
76
print ("\n \n NOTIFIED_LEAVE_GROUP\n \n " )
@@ -141,12 +141,17 @@ def SEND_MESSAGE(op):
141
141
sendMessage (msg .to , msg .to )
142
142
if msg .text == "ginfo" :
143
143
group = client .getGroup (msg .to )
144
- md = "[Group Name ]\n " + group .name + "\n \n [gid ]\n " + group .id + "\n \n [Group Picture ]\n http://dl.profile.line-cdn.net/" + group .pictureStatus
145
- if group .preventJoinByTicket is False : md += "\n \n InvitationURL: Permitted \n "
146
- else : md += "\n \n InvitationURL: Refusing \n "
147
- if group .invitee is None : md += "\n Members : " + str (len (group .members )) + "人\n \n Inviting: 0People "
148
- else : md += "\n Members : " + str (len (group .members )) + "People \n Invited : " + str (len (group .invitee )) + "People "
144
+ md = "ㄌㄑ愛ㄎㄩ \n \n [群組名稱 ]\n " + group .name + "\n \n [群組gid ]\n " + group .id + "\n \n [群組照片 ]\n http://dl.profile.line-cdn.net/" + group .pictureStatus
145
+ if group .preventJoinByTicket is False : md += "\n \n 群組URL: 許可中 \n "
146
+ else : md += "\n \n 群組URL: 關閉中 \n "
147
+ if group .invitee is None : md += "\n 成員人數 : " + str (len (group .members )) + "人\n \n 招待中人數: 0人 "
148
+ else : md += "\n 成員人數 : " + str (len (group .members )) + "人 \n 招待中人數 : " + str (len (group .invitee )) + "人 "
149
149
sendMessage (msg .to ,md )
150
+ if msg .text == "help" :
151
+ sendMessage (msg .to , "ㄌㄑandㄎㄩ 專屬help\n [Mid] 查看自己的mid\n [gid] 查看群組gid\n [me︎] 送出自己的友資\n [ginfo] 查看群組詳細資料\n
152
+ [url ] 取得群組網址 \n [urlon ] 開啟群組網址 \n [urloff ] 關閉群組網址 \n [kick :] 利用mid踢人 \n [Nk :] 利用名字踢人 (完整用戶名稱 )\n
153
+ [cancel ] 取消全部邀請 \n [invite :] 利用mid邀請 \n [show :] 顯示mid得友資 \n [set ] 設定已讀點 \n [read ] 顯示已讀用戶 \n
154
+ [time ] 顯示現在時間 \n [gift ] 發送禮物 \n \n \n \n [" + datetime.datetime.today().strftime('%Y年%m月%d日 %H:%M:%S') + " ]")
150
155
if "gname:" in msg .text :
151
156
key = msg .text [22 :]
152
157
group = client .getGroup (msg .to )
@@ -155,54 +160,54 @@ def SEND_MESSAGE(op):
155
160
sendMessage (msg .to ,"Group Name" + key + "Canged to" )
156
161
if msg .text == "url" :
157
162
sendMessage (msg .to ,"line://ti/g/" + client ._client .reissueGroupTicket (msg .to ))
158
- if msg .text == "open " :
163
+ if msg .text == "urlon " :
159
164
group = client .getGroup (msg .to )
160
165
if group .preventJoinByTicket == False :
161
- sendMessage (msg .to , "already open " )
166
+ sendMessage (msg .to , "網址早就開了 " )
162
167
else :
163
168
group .preventJoinByTicket = False
164
169
client .updateGroup (group )
165
- sendMessage (msg .to , "URL Open " )
166
- if msg .text == "close " :
170
+ sendMessage (msg .to , "ㄌㄑ已開啟群組URL " )
171
+ if msg .text == "urloff " :
167
172
group = client .getGroup (msg .to )
168
173
if group .preventJoinByTicket == True :
169
- sendMessage (msg .to , "already close " )
174
+ sendMessage (msg .to , "網址早就關了 " )
170
175
else :
171
176
group .preventJoinByTicket = True
172
177
client .updateGroup (group )
173
- sendMessage (msg .to , "URL close " )
178
+ sendMessage (msg .to , "ㄌㄑ已關閉群組URL " )
174
179
if "kick:" in msg .text :
175
180
key = msg .text [5 :]
176
181
client .kickoutFromGroup (msg .to , [key ])
177
182
contact = client .getContact (key )
178
- sendMessage (msg .to , "" + contact .displayName + "sorry " )
179
- if "nk :" in msg .text :
183
+ sendMessage (msg .to , "" + contact .displayName + "被我踢了>< " )
184
+ if "Nk :" in msg .text :
180
185
key = msg .text [3 :]
181
186
group = client .getGroup (msg .to )
182
187
Names = [contact .displayName for contact in group .members ]
183
188
Mids = [contact .mid for contact in group .members ]
184
189
if key in Names :
185
190
kazu = Names .index (key )
186
- sendMessage (msg .to , "Bye " )
191
+ sendMessage (msg .to , "ㄌㄑandㄎㄩ 跟你說掰掰~ " )
187
192
client .kickoutFromGroup (msg .to , ["" + Mids [kazu ]+ "" ])
188
193
contact = client .getContact (Mids [kazu ])
189
- sendMessage (msg .to , "" + contact .displayName + " Sorry " )
194
+ sendMessage (msg .to , "" + contact .displayName + " 被我踢了 嘿嘿 " )
190
195
else :
191
196
sendMessage (msg .to , "wtf?" )
192
197
if msg .text == "cancel" :
193
198
group = client .getGroup (msg .to )
194
199
if group .invitee is None :
195
- sendMessage (op .message .to , "沒有邀請昂 ><" )
200
+ sendMessage (op .message .to , "沒有邀請了昂 ><" )
196
201
else :
197
202
gInviMids = [contact .mid for contact in group .invitee ]
198
203
client .cancelGroupInvitation (msg .to , gInviMids )
199
- sendMessage (msg .to , str (len (group .invitee )) + "人 已被戦神取消 " )
204
+ sendMessage (msg .to , str (len (group .invitee )) + "人已被ㄌㄑ取消~ " )
200
205
if "invite:" in msg .text :
201
206
key = msg .text [- 33 :]
202
207
client .findAndAddContactsByMid (key )
203
208
client .inviteIntoGroup (msg .to , [key ])
204
209
contact = client .getContact (key )
205
- sendMessage (msg .to , "" + contact .displayName + " I invited you " )
210
+ sendMessage (msg .to , "" + contact .displayName + " 已經被ㄌㄑ邀請了~ " )
206
211
if msg .text == "me" :
207
212
M = Message ()
208
213
M .to = msg .to
@@ -213,13 +218,13 @@ def SEND_MESSAGE(op):
213
218
key = msg .text [- 33 :]
214
219
sendMessage (msg .to , text = None , contentMetadata = {'mid' : key }, contentType = 13 )
215
220
contact = client .getContact (key )
216
- sendMessage (msg .to , "" + contact .displayName + "'s contact " )
221
+ sendMessage (msg .to , "" + contact .displayName + "的友資~ " )
217
222
if msg .text == "time" :
218
223
sendMessage (msg .to , "精確的時間為" + datetime .datetime .today ().strftime ('%Y年%m月%d日 %H:%M:%S' ) + " 唷" )
219
224
if msg .text == "gift" :
220
225
sendMessage (msg .to , text = "gift sent" , contentMetadata = None , contentType = 9 )
221
226
if msg .text == "set" :
222
- sendMessage (msg .to , "I 成功 " )
227
+ sendMessage (msg .to , "ㄌㄑ已設定已讀點~ " )
223
228
try :
224
229
del wait ['readPoint' ][msg .to ]
225
230
del wait ['readMember' ][msg .to ]
@@ -240,9 +245,9 @@ def SEND_MESSAGE(op):
240
245
print rom
241
246
chiya += rom [1 ] + "\n "
242
247
243
- sendMessage (msg .to , "People who readed %s\n that's it \n \n People who have ignored reads \n %sIt is abnormal ♪\n \n Reading point creation date n time :\n [%s]" % (wait ['readMember' ][msg .to ],chiya ,setTime [msg .to ]))
248
+ sendMessage (msg .to , "ㄌㄑ來抓已讀囉~ \n \n 已讀的人有: \n %s\n >< \n \n 已讀不回的人有: \n %s ♪\n \n 已讀點設定時間 :\n [%s]" % (wait ['readMember' ][msg .to ],chiya ,setTime [msg .to ]))
244
249
else :
245
- sendMessage (msg .to , "請先set " )
250
+ sendMessage (msg .to , "笨ㄌㄑ還沒設已讀點拉>< " )
246
251
else :
247
252
pass
248
253
else :
0 commit comments