chatroomsList = ['微信机器人测试','北京华城维护群','武汉仲裁答疑内网群','久诚维信仲裁交流群','襄仲云网上仲裁服务','格鲁布网仲云','仲裁维护群','武汉仲裁委外网答疑群','得伟君尚律所仲裁维护群','哈仲北京国旺']
# pip install itchat
import itchat, time
from itchat.content import *
@itchat.msg_register(TEXT, isGroupChat=True)
def text_reply(msg):
print('-------------群名称-----------')
print(msg.User.NickName)
print('------------------------------')
if msg.User.NickName in chatroomsList:
print(msg.type)
print(msg.text)
if (('二维码' in msg.text) or ('安卓' in msg.text and '下载' in msg.text)):
msg.user.send(u'@%s\u2005 苹果手机请在app store搜索“移动仲裁”下载,安卓手机扫描二维码下载。' % (msg.actualNickName))
msg.user.send("@img@%s" % 'anzhuoerweima.jpg')
elif '验证码' in msg.text:
msg.user.send(u'@%s\u2005 如未收到短信验证码,请等待读秒结束后,点击“语音获取验证码”。' % (msg.actualNickName))
elif ('蓝牙' in msg.text or '读卡器' in msg.text):
msg.user.send("@fil@%s" % 'lanya.docx')
itchat.auto_login(True)
itchat.run(True)