Skip to content

Commit

Permalink
增加拍一拍
Browse files Browse the repository at this point in the history
  • Loading branch information
smallevilbeast committed Sep 8, 2022
1 parent 38d34ff commit 8db8998
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">NtChat</h1>
<p align="center">
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.10-blue.svg?" alt="release"></a>
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.11-blue.svg?" alt="release"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg?" alt="License"></a>
</p>

Expand Down
7 changes: 6 additions & 1 deletion ntchat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion ntchat/conf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '0.1.10'
VERSION = '0.1.11'

LOG_LEVEL = "DEBUG"
LOG_KEY = 'NTCHAT_LOG'
Expand Down
3 changes: 3 additions & 0 deletions ntchat/const/send_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@

# 数据库查询
MT_SQL_QUERY_MSG = 11027

# 拍一拍
MT_SEND_PAT_MSG = 11250
10 changes: 10 additions & 0 deletions ntchat/core/wechat.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,16 @@ def send_xml(self, to_wxid, xml, app_type=5):
}
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):
"""
同意加好友请求
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def add_prefix(l, prefix):

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',
Expand Down

0 comments on commit 8db8998

Please sign in to comment.