Skip to content

Commit 3467194

Browse files
committed
feat: add wechat-autoReply
1 parent 57362bd commit 3467194

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

autoReply.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import itchat, time, re
4+
from itchat.content import *
5+
6+
# 如果发送的是文字
7+
@itchat.msg_register([TEXT])
8+
def text_reply(msg):
9+
#match = re.search('', msg['Text'])
10+
#if match:
11+
itchat.send('[自动回复]', msg['FromUserName'])
12+
13+
# 如果发送的是图片,音频,视频和分享的东西
14+
@itchat.msg_register([PICTURE,RECORDING,VIDEO,SHARING])
15+
def other_reply(msg):
16+
itchat.send('[自动回复]', msg['FromUserName'])
17+
18+
itchat.auto_login(hotReload=True)
19+
itchat.run()

0 commit comments

Comments
 (0)