From 8db8998aaaf80c9fb09bd5ef21e9cd8d61a5607f Mon Sep 17 00:00:00 2001 From: evilbeast Date: Thu, 8 Sep 2022 12:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=8D=E4=B8=80=E6=8B=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- ntchat/__init__.py | 7 ++++++- ntchat/conf/__init__.py | 2 +- ntchat/const/send_type.py | 3 +++ ntchat/core/wechat.py | 10 ++++++++++ setup.py | 2 +- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4aa377e..9ba8922 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

NtChat

- release + release License

diff --git a/ntchat/__init__.py b/ntchat/__init__.py index b641727..d24e420 100644 --- a/ntchat/__init__.py +++ b/ntchat/__init__.py @@ -16,4 +16,9 @@ def set_wechat_exe_path(wechat_exe_path=None, wechat_version=None): conf.DEFAULT_WECHAT_VERSION = wechat_version -exit_ = wcprobe.exit +def get_install_wechat_version(): + return wcprobe.get_install_wechat_version() + + +def exit_(): + wcprobe.exit() diff --git a/ntchat/conf/__init__.py b/ntchat/conf/__init__.py index 51a1dd2..8a982cd 100644 --- a/ntchat/conf/__init__.py +++ b/ntchat/conf/__init__.py @@ -1,4 +1,4 @@ -VERSION = '0.1.10' +VERSION = '0.1.11' LOG_LEVEL = "DEBUG" LOG_KEY = 'NTCHAT_LOG' diff --git a/ntchat/const/send_type.py b/ntchat/const/send_type.py index f5cada4..a89dbeb 100644 --- a/ntchat/const/send_type.py +++ b/ntchat/const/send_type.py @@ -75,3 +75,6 @@ MT_ADD_FRIEND_MSG = 11062 # 数据库查询 MT_SQL_QUERY_MSG = 11027 + +# 拍一拍 +MT_SEND_PAT_MSG = 11250 diff --git a/ntchat/core/wechat.py b/ntchat/core/wechat.py index 9b13e11..dc0da41 100644 --- a/ntchat/core/wechat.py +++ b/ntchat/core/wechat.py @@ -360,6 +360,16 @@ class WeChat: } return self.__send(send_type.MT_SEND_XML_MSG, data) + def send_pat(self, room_wxid: str, patted_wxid: str): + """ + 发送拍一拍 + """ + data = { + "room_wxid": room_wxid, + "patted_wxid": patted_wxid + } + return self.__send_sync(send_type.MT_SEND_PAT_MSG, data) + def accept_friend_request(self, encryptusername: str, ticket: str, scene: int): """ 同意加好友请求 diff --git a/setup.py b/setup.py index 2bd55f6..590eb05 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.10', + version='0.1.11', description='About Conversational RPA SDK for Chatbot Makers', long_description="", long_description_content_type='text/markdown',