def groupchat_reply(msg):
groupNmae = itchat.search_chatrooms(userName=msg['FromUserName']).get('NickName')
logging.info('group {}-{}: {}-{}: send {}'.format(
groupNmae, msg['FromUserName'], msg['ActualNickName'], msg['ActualUserName'], msg['Content']))
if msg['Text'][0] == interpreter.PY_SYMBLOE:
replay_text = interpreter.run_py_cmd(msg['Text'][1:])
elif msg['isAt']:
replay_text = tuling.replay_text(msg['Text'], msg['ActualNickName']) or REPLAY_ERROR_TEXT
else:
replay_text = ''
if replay_text:
itchat.send(replay_text, msg['FromUserName'])
评论列表
文章目录