reywechat 1.0.79__py3-none-any.whl → 1.0.80__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reywechat/rclient.py +19 -19
- reywechat/rdb.py +3 -3
- reywechat/rlog.py +1 -1
- reywechat/rreceive.py +2 -2
- reywechat/rsend.py +3 -3
- reywechat/rtrigger.py +1 -1
- reywechat/rwechat.py +1 -1
- {reywechat-1.0.79.dist-info → reywechat-1.0.80.dist-info}/METADATA +1 -1
- reywechat-1.0.80.dist-info/RECORD +16 -0
- reywechat-1.0.79.dist-info/RECORD +0 -16
- {reywechat-1.0.79.dist-info → reywechat-1.0.80.dist-info}/WHEEL +0 -0
- {reywechat-1.0.79.dist-info → reywechat-1.0.80.dist-info}/licenses/LICENSE +0 -0
reywechat/rclient.py
CHANGED
@@ -212,7 +212,7 @@ class WeChatClient(WeChatBase):
|
|
212
212
|
Inject DLL file of start API into the WeChat client process.
|
213
213
|
"""
|
214
214
|
|
215
|
-
#
|
215
|
+
# Set parameter.
|
216
216
|
dll_file_relpath = './data/client_api.dll'
|
217
217
|
dll_file_path = find_relpath(__file__, dll_file_relpath)
|
218
218
|
|
@@ -251,7 +251,7 @@ class WeChatClient(WeChatBase):
|
|
251
251
|
Client response content dictionary.
|
252
252
|
"""
|
253
253
|
|
254
|
-
#
|
254
|
+
# Set parameter.
|
255
255
|
url = f'http://127.0.0.1:{self.client_api_port}/api/{api}'
|
256
256
|
data = data or {}
|
257
257
|
if type(success_code) == int:
|
@@ -299,7 +299,7 @@ class WeChatClient(WeChatBase):
|
|
299
299
|
Check result.
|
300
300
|
"""
|
301
301
|
|
302
|
-
#
|
302
|
+
# Set parameter.
|
303
303
|
api = 'checkLogin'
|
304
304
|
|
305
305
|
# Request.
|
@@ -352,7 +352,7 @@ class WeChatClient(WeChatBase):
|
|
352
352
|
- `Key 'decrypt_key'`: Database decrypt key.
|
353
353
|
"""
|
354
354
|
|
355
|
-
#
|
355
|
+
# Set parameter.
|
356
356
|
api = 'userInfo'
|
357
357
|
|
358
358
|
# Request.
|
@@ -402,7 +402,7 @@ class WeChatClient(WeChatBase):
|
|
402
402
|
timeout : Request timeout seconds.
|
403
403
|
"""
|
404
404
|
|
405
|
-
#
|
405
|
+
# Set parameter.
|
406
406
|
api = 'hookSyncMsg'
|
407
407
|
port = str(port)
|
408
408
|
timeout_ms_str = str(int(timeout * 1000))
|
@@ -440,7 +440,7 @@ class WeChatClient(WeChatBase):
|
|
440
440
|
Unhook the message.
|
441
441
|
"""
|
442
442
|
|
443
|
-
#
|
443
|
+
# Set parameter.
|
444
444
|
api = 'unhookSyncMsg'
|
445
445
|
|
446
446
|
# Request.
|
@@ -462,7 +462,7 @@ class WeChatClient(WeChatBase):
|
|
462
462
|
id\\_ : Message ID.
|
463
463
|
"""
|
464
464
|
|
465
|
-
#
|
465
|
+
# Set parameter.
|
466
466
|
api = 'downloadAttach'
|
467
467
|
data = {'msgId': id_}
|
468
468
|
|
@@ -484,7 +484,7 @@ class WeChatClient(WeChatBase):
|
|
484
484
|
dir\\_ : Save directory.
|
485
485
|
"""
|
486
486
|
|
487
|
-
#
|
487
|
+
# Set parameter.
|
488
488
|
api = 'getVoiceByMsgId'
|
489
489
|
dir_ = os_abspath(dir_)
|
490
490
|
data = {
|
@@ -517,7 +517,7 @@ class WeChatClient(WeChatBase):
|
|
517
517
|
- `Key 'name'`: User nickname or chat room name.
|
518
518
|
"""
|
519
519
|
|
520
|
-
#
|
520
|
+
# Set parameter.
|
521
521
|
api = 'getContactList'
|
522
522
|
filter_names = {
|
523
523
|
'filehelper': '朋友推荐消息',
|
@@ -586,7 +586,7 @@ class WeChatClient(WeChatBase):
|
|
586
586
|
User nickname or chat room name.
|
587
587
|
"""
|
588
588
|
|
589
|
-
#
|
589
|
+
# Set parameter.
|
590
590
|
api = 'getContactProfile'
|
591
591
|
data = {'wxid': id_}
|
592
592
|
|
@@ -619,7 +619,7 @@ class WeChatClient(WeChatBase):
|
|
619
619
|
List of chat room member user ID.
|
620
620
|
"""
|
621
621
|
|
622
|
-
#
|
622
|
+
# Set parameter.
|
623
623
|
api = 'getMemberFromChatRoom'
|
624
624
|
data = {'chatRoomId': room_id}
|
625
625
|
|
@@ -683,7 +683,7 @@ class WeChatClient(WeChatBase):
|
|
683
683
|
if text == '':
|
684
684
|
throw(ValueError, text)
|
685
685
|
|
686
|
-
#
|
686
|
+
# Set parameter.
|
687
687
|
api = 'sendTextMsg'
|
688
688
|
data = {
|
689
689
|
'wxid': receive_id,
|
@@ -717,7 +717,7 @@ class WeChatClient(WeChatBase):
|
|
717
717
|
if text == '':
|
718
718
|
throw(ValueError, text)
|
719
719
|
|
720
|
-
#
|
720
|
+
# Set parameter.
|
721
721
|
api = 'sendAtText'
|
722
722
|
if type(user_id) != str:
|
723
723
|
user_id = ','.join(user_id)
|
@@ -745,7 +745,7 @@ class WeChatClient(WeChatBase):
|
|
745
745
|
path : Message file path.
|
746
746
|
"""
|
747
747
|
|
748
|
-
#
|
748
|
+
# Set parameter.
|
749
749
|
api = 'sendFileMsg'
|
750
750
|
data = {
|
751
751
|
'wxid': receive_id,
|
@@ -770,7 +770,7 @@ class WeChatClient(WeChatBase):
|
|
770
770
|
path : Message image file path.
|
771
771
|
"""
|
772
772
|
|
773
|
-
#
|
773
|
+
# Set parameter.
|
774
774
|
api = 'sendImagesMsg'
|
775
775
|
data = {
|
776
776
|
'wxid': receive_id,
|
@@ -795,7 +795,7 @@ class WeChatClient(WeChatBase):
|
|
795
795
|
path : Message emotion file path.
|
796
796
|
"""
|
797
797
|
|
798
|
-
#
|
798
|
+
# Set parameter.
|
799
799
|
api = 'sendCustomEmotion'
|
800
800
|
data = {
|
801
801
|
'wxid': receive_id,
|
@@ -820,7 +820,7 @@ class WeChatClient(WeChatBase):
|
|
820
820
|
user_id : User ID of pat.
|
821
821
|
"""
|
822
822
|
|
823
|
-
#
|
823
|
+
# Set parameter.
|
824
824
|
api = 'sendPatMsg'
|
825
825
|
data = {
|
826
826
|
'wxid': receive_id,
|
@@ -855,7 +855,7 @@ class WeChatClient(WeChatBase):
|
|
855
855
|
public_id : Control public account ID.
|
856
856
|
"""
|
857
857
|
|
858
|
-
#
|
858
|
+
# Set parameter.
|
859
859
|
text = text or ''
|
860
860
|
image_url = image_url or ''
|
861
861
|
public_name = public_name or ''
|
@@ -889,7 +889,7 @@ class WeChatClient(WeChatBase):
|
|
889
889
|
message_id : Forward message ID.
|
890
890
|
"""
|
891
891
|
|
892
|
-
#
|
892
|
+
# Set parameter.
|
893
893
|
api = 'sendImagesMsg'
|
894
894
|
data = {
|
895
895
|
'wxid': receive_id,
|
reywechat/rdb.py
CHANGED
@@ -1156,7 +1156,7 @@ class WeChatDatabase(WeChatBase):
|
|
1156
1156
|
if send_params.status != WeChatSendStatusEnum.SENT:
|
1157
1157
|
return
|
1158
1158
|
|
1159
|
-
#
|
1159
|
+
# Set parameter.
|
1160
1160
|
if send_params.exc_reports == []:
|
1161
1161
|
status = 2
|
1162
1162
|
else:
|
@@ -1223,7 +1223,7 @@ class WeChatDatabase(WeChatBase):
|
|
1223
1223
|
Read record from table `message_send`, put send queue.
|
1224
1224
|
"""
|
1225
1225
|
|
1226
|
-
#
|
1226
|
+
# Set parameter.
|
1227
1227
|
conn = self.database_wechat.connect()
|
1228
1228
|
|
1229
1229
|
# Read.
|
@@ -1377,7 +1377,7 @@ class WeChatDatabase(WeChatBase):
|
|
1377
1377
|
send_params : `WeChatSendParameters` instance.
|
1378
1378
|
"""
|
1379
1379
|
|
1380
|
-
#
|
1380
|
+
# Set parameter.
|
1381
1381
|
params = send_params.params.copy()
|
1382
1382
|
data = {
|
1383
1383
|
'status': 0,
|
reywechat/rlog.py
CHANGED
reywechat/rreceive.py
CHANGED
@@ -169,7 +169,7 @@ class WeChatMessage(WeChatBase):
|
|
169
169
|
Parameters dictionary.
|
170
170
|
"""
|
171
171
|
|
172
|
-
#
|
172
|
+
# Set parameter.
|
173
173
|
params: MessageParameters = {
|
174
174
|
'time': self.time,
|
175
175
|
'id': self.id,
|
@@ -1496,7 +1496,7 @@ class WeChatMessage(WeChatBase):
|
|
1496
1496
|
- When no match, then return `None`.
|
1497
1497
|
"""
|
1498
1498
|
|
1499
|
-
#
|
1499
|
+
# Set parameter.
|
1500
1500
|
text = text or self.data
|
1501
1501
|
|
1502
1502
|
# Search.
|
reywechat/rsend.py
CHANGED
@@ -521,7 +521,7 @@ class WeChatSender(WeChatBase):
|
|
521
521
|
params : Send parameters.
|
522
522
|
"""
|
523
523
|
|
524
|
-
#
|
524
|
+
# Set parameter.
|
525
525
|
send_params = WeChatSendParameters(
|
526
526
|
self,
|
527
527
|
send_type,
|
@@ -578,7 +578,7 @@ class WeChatSender(WeChatBase):
|
|
578
578
|
Added text.
|
579
579
|
"""
|
580
580
|
|
581
|
-
#
|
581
|
+
# Set parameter.
|
582
582
|
member_dict = self.wechat.client.get_room_member_dict(room_id)
|
583
583
|
login_id = self.wechat.client.login_info['id']
|
584
584
|
if login_id in member_dict:
|
@@ -617,7 +617,7 @@ class WeChatSender(WeChatBase):
|
|
617
617
|
Decorated function.
|
618
618
|
"""
|
619
619
|
|
620
|
-
#
|
620
|
+
# Set parameter.
|
621
621
|
if type(receive_id) == str:
|
622
622
|
receive_ids = [receive_id]
|
623
623
|
else:
|
reywechat/rtrigger.py
CHANGED
@@ -135,7 +135,7 @@ class WeChatTrigger(WeChatBase):
|
|
135
135
|
is_reply : Whehter is reply function, allow call `WeChatMessage.reply`, can only reply once function.
|
136
136
|
"""
|
137
137
|
|
138
|
-
#
|
138
|
+
# Set parameter.
|
139
139
|
rule: TriggerRule = {
|
140
140
|
'level': level,
|
141
141
|
'execute': execute,
|
reywechat/rwechat.py
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
reywechat/__init__.py,sha256=FXc3XSiPLLmz9bgZdiYKxeWX-7VT9RqPc_EkXp3Kk0I,476
|
2
|
+
reywechat/rall.py,sha256=5J_X-XMOyb1Vp1jyS9-oRFXGOtp2vRPX1g3tJot_Eck,371
|
3
|
+
reywechat/rbase.py,sha256=hbxn5spvcl_C_Bw8A9teulOXT9GMlxUw145_YbXIOzc,1124
|
4
|
+
reywechat/rcache.py,sha256=5FIa8UB3VsLHT_EXHHmFP62a5AeS22anJCJXC8t4tWw,908
|
5
|
+
reywechat/rclient.py,sha256=j4ktgD2l1W9ktrTtfQfyIXCxc7KnT-gvqgy8-zRq8IU,22655
|
6
|
+
reywechat/rdb.py,sha256=0wEsAr3FB-g0DPpU42XgpLqY9kzRbAaaba_Zl02mN_Q,50426
|
7
|
+
reywechat/rlog.py,sha256=JnzuSfQCKnvASPjZw9KrLTX9TjT79KLbciu8XeIA_88,5256
|
8
|
+
reywechat/rreceive.py,sha256=pgbRfkI7aXcC9-wUAueGcBdob4TsGbrMv33IfvGPbqU,50966
|
9
|
+
reywechat/rsend.py,sha256=niYmnbm4uzhp5Qh86EMMB39wn37k3CIwL9IBJ5i1UXk,20070
|
10
|
+
reywechat/rtrigger.py,sha256=gDnokfFjw29Kz9qazxtb2clT2pBsuOJqIEErvg7L3hE,4986
|
11
|
+
reywechat/rwechat.py,sha256=i8y-4kl7XRw-auVGy8JJ0Ci55Th7FWCiyK3ZzFOb3xg,4748
|
12
|
+
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
+
reywechat-1.0.80.dist-info/METADATA,sha256=89D7CPi82CvgSx5XE4ejxjEupz6tzz4JuPNWOksofxk,1551
|
14
|
+
reywechat-1.0.80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reywechat-1.0.80.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reywechat-1.0.80.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
reywechat/__init__.py,sha256=FXc3XSiPLLmz9bgZdiYKxeWX-7VT9RqPc_EkXp3Kk0I,476
|
2
|
-
reywechat/rall.py,sha256=5J_X-XMOyb1Vp1jyS9-oRFXGOtp2vRPX1g3tJot_Eck,371
|
3
|
-
reywechat/rbase.py,sha256=hbxn5spvcl_C_Bw8A9teulOXT9GMlxUw145_YbXIOzc,1124
|
4
|
-
reywechat/rcache.py,sha256=5FIa8UB3VsLHT_EXHHmFP62a5AeS22anJCJXC8t4tWw,908
|
5
|
-
reywechat/rclient.py,sha256=ayOtQ0CaF8ydXjirLdVed8FbpfdQVTKVSd0x4grs-pQ,22712
|
6
|
-
reywechat/rdb.py,sha256=84yKQ72uGjn5clpFOHLKhpmbQo5d1fo_s-RGGKtnpc8,50435
|
7
|
-
reywechat/rlog.py,sha256=TSA-_5pwlq0sUND2cnLDqXvdmAdMAkC7tXIz3WfJ7Xw,5259
|
8
|
-
reywechat/rreceive.py,sha256=YPMW99BDfgdv-6LdWE0C1NNQdh_FWVclcMMMioe74lo,50972
|
9
|
-
reywechat/rsend.py,sha256=MUpLeVeKc-9zswARqB3WLDmaOPLpAtN_u4788MHWoC8,20079
|
10
|
-
reywechat/rtrigger.py,sha256=c0peI208K2k2sOxtuszD8UMrhMrTGp0LMi_XE5ksJKg,4989
|
11
|
-
reywechat/rwechat.py,sha256=g0pbprMPv_qWb_lGFrPDAWsJO4vPSIgFLkw0Y28CZUo,4751
|
12
|
-
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
-
reywechat-1.0.79.dist-info/METADATA,sha256=pK76U_EITXgg2f2kH3Wr0uEeuPyt8xcFHcqIlkp5LS4,1551
|
14
|
-
reywechat-1.0.79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
-
reywechat-1.0.79.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
-
reywechat-1.0.79.dist-info/RECORD,,
|
File without changes
|
File without changes
|