Home > other >  Help forward why forward itchat group of pictures into a pile of letters and Numbers?
Help forward why forward itchat group of pictures into a pile of letters and Numbers?

Time:10-06

Simple code below
 # coding=utf-8 
The import itchat
# login
Itchat. Auto_login ()
# send text messages, send goal is "file transfer assistant
"Itchat. Send (' Hello, filehelper, toUserName='filehelper')
The from itchat. Content import PICTURE
The from itchat. Content import *

@ itchat. Msg_register (PICTURE, isGroupChat=True)
Def group_image (MSG) :
Group=itchat. Get_chatrooms (update=True)
From_user='
For in group g:
If g [' NickName ']=='Turing the hair: # found in the group of the specified group chat
From_group=g [' UserName ']
For menb in g [' MemberList '] :
# print (menb [' NickName '])
If menb [' NickName ']=="naughty" : # from group members find the user list, just forward his message
From_user=menb [' UserName ']
Break
If g [' NickName ']=='Turing Lord send 1: # to send the message to the group
To_group=g [' UserName ']
If the MSG==[' FromUserName] from_group:
If the MSG==[' ActualUserName] from_user:
Itchat. Send (' % s' % (MSG) [' Content '], to_group)
Itchat. Auto_login (hotReload=False)
Itchat. The run ()
  • Related