From 9a0cc00493f37cfebaa66394037ab8245a147776 Mon Sep 17 00:00:00 2001 From: evilbeast Date: Fri, 9 Sep 2022 13:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E4=B8=AD=E8=B0=83=E7=94=A8=E5=90=8C=E6=AD=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9ENone=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- examples/auto_accept_friend_request.py | 6 +++++- ntchat/conf/__init__.py | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ba8922..59e5a1c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

NtChat

- release + release License

diff --git a/examples/auto_accept_friend_request.py b/examples/auto_accept_friend_request.py index 6af0f36..676883f 100644 --- a/examples/auto_accept_friend_request.py +++ b/examples/auto_accept_friend_request.py @@ -22,7 +22,11 @@ def on_recv_text_msg(wechat_instance: ntchat.WeChat, message): scene = dom.documentElement.getAttribute("scene") # 自动同意好友申请 - wechat_instance.accept_friend_request(encryptusername, ticket, int(scene)) + ret = wechat_instance.accept_friend_request(encryptusername, ticket, int(scene)) + + if ret: + # 通过后向他发条消息 + wechat_instance.send_text(to_wxid=ret["userName"], content="你好!!!!!") # 以下是为了让程序不结束,如果有用于PyQt等有主循环消息的框架,可以去除下面代码 diff --git a/ntchat/conf/__init__.py b/ntchat/conf/__init__.py index 8a982cd..409e605 100644 --- a/ntchat/conf/__init__.py +++ b/ntchat/conf/__init__.py @@ -1,4 +1,4 @@ -VERSION = '0.1.11' +VERSION = '0.1.12' LOG_LEVEL = "DEBUG" LOG_KEY = 'NTCHAT_LOG' diff --git a/setup.py b/setup.py index 590eb05..ac7e06f 100644 --- a/setup.py +++ b/setup.py @@ -194,7 +194,7 @@ extension.extra_compile_cpp_args = extra_compile_cpp_args[target_os] setup( name='ntchat', - version='0.1.11', + version='0.1.12', description='About Conversational RPA SDK for Chatbot Makers', long_description="", long_description_content_type='text/markdown',