使用itchat完成微信自动回复

import itchat
from itchat.content import *
# 微信自动回复
@itchat.msg_register([TEXT])
def text_reply(msg):
    print(msg)
    text = msg['Text']
    print(text)
    to_user = msg["ToUserName"]
    if "" in text:
        itchat.send("谢谢你的祝福,我祝你来年赚大钱,迎娶白富美,走上人生巅峰", to_user)

# 等待 扫描二维码  不需要第二次扫描
itchat.auto_login(hotReload=True)
# 等到回复
itchat.run()
# zb983978082

# 练习:微信自动回复, 自己给自己发微信,然后自己回复自己
原文地址:https://www.cnblogs.com/zhangboblogs/p/10108612.html