reywechat 1.0.79__py3-none-any.whl → 1.0.81__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 +255 -525
- reywechat/rlog.py +1 -1
- reywechat/rreceive.py +3 -3
- reywechat/rsend.py +4 -4
- reywechat/rtrigger.py +1 -1
- reywechat/rwechat.py +5 -5
- {reywechat-1.0.79.dist-info → reywechat-1.0.81.dist-info}/METADATA +1 -1
- reywechat-1.0.81.dist-info/RECORD +16 -0
- reywechat-1.0.79.dist-info/RECORD +0 -16
- {reywechat-1.0.79.dist-info → reywechat-1.0.81.dist-info}/WHEEL +0 -0
- {reywechat-1.0.79.dist-info → reywechat-1.0.81.dist-info}/licenses/LICENSE +0 -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,
|
@@ -1461,7 +1461,7 @@ class WeChatMessage(WeChatBase):
|
|
1461
1461
|
return self._cache['valid']
|
1462
1462
|
|
1463
1463
|
# Judge.
|
1464
|
-
self._cache['valid'] = self.receiver.wechat.
|
1464
|
+
self._cache['valid'] = self.receiver.wechat.db.is_valid(self)
|
1465
1465
|
|
1466
1466
|
return self._cache['valid']
|
1467
1467
|
|
@@ -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,
|
@@ -537,7 +537,7 @@ class WeChatSender(WeChatBase):
|
|
537
537
|
handler(send_params)
|
538
538
|
|
539
539
|
# Insert.
|
540
|
-
self.wechat.
|
540
|
+
self.wechat.db._insert_send(send_params)
|
541
541
|
|
542
542
|
|
543
543
|
def add_handler(
|
@@ -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
@@ -40,7 +40,7 @@ class WeChat(WeChatBase):
|
|
40
40
|
|
41
41
|
def __init__(
|
42
42
|
self,
|
43
|
-
|
43
|
+
db: Database | dict[Literal['wechat', 'file'], Database] | None,
|
44
44
|
max_receiver: int = 2,
|
45
45
|
call_name: str | None = None,
|
46
46
|
project_dir: str | None = None
|
@@ -50,7 +50,7 @@ class WeChat(WeChatBase):
|
|
50
50
|
|
51
51
|
Parameters
|
52
52
|
----------
|
53
|
-
|
53
|
+
db : `Database` instance of `reykit` package.
|
54
54
|
- `Database`, Set all `Database`: instances.
|
55
55
|
- `dict`, Set each `Database`: instance, all item is required.
|
56
56
|
`Key 'wechat'`: `Database` instance used in WeChat methods.
|
@@ -81,7 +81,7 @@ class WeChat(WeChatBase):
|
|
81
81
|
self.receiver = WechatReceiver(self, max_receiver, call_name)
|
82
82
|
self.trigger = self.receiver.trigger
|
83
83
|
self.sender = WeChatSender(self)
|
84
|
-
self.
|
84
|
+
self.db = WeChatDatabase(self, db)
|
85
85
|
|
86
86
|
## Client.
|
87
87
|
self.client_version = self.client.client_version
|
@@ -109,7 +109,7 @@ class WeChat(WeChatBase):
|
|
109
109
|
self.wrap_try_send = self.sender.wrap_try_send
|
110
110
|
|
111
111
|
## Database.
|
112
|
-
self.database_build = self.
|
112
|
+
self.database_build = self.db.build_db
|
113
113
|
|
114
114
|
|
115
115
|
def start(self) -> None:
|
@@ -144,7 +144,7 @@ class WeChat(WeChatBase):
|
|
144
144
|
Result.
|
145
145
|
"""
|
146
146
|
|
147
|
-
#
|
147
|
+
# Set parameter.
|
148
148
|
result = self.error.rrlog.print_colour
|
149
149
|
|
150
150
|
return result
|
@@ -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=-tZ1xzWKgDnt_sYLNQqmqMigrv8vdWpafJoismO33AA,39942
|
7
|
+
reywechat/rlog.py,sha256=JnzuSfQCKnvASPjZw9KrLTX9TjT79KLbciu8XeIA_88,5256
|
8
|
+
reywechat/rreceive.py,sha256=PjDdbF5tJh-bj2p_DxwYKXfk6dDkmv4s8W77Z1ODE1M,50960
|
9
|
+
reywechat/rsend.py,sha256=m3TvKlmBKK8KTsM85DeWIHbhVTRWbLMetBAU-zBYkAc,20064
|
10
|
+
reywechat/rtrigger.py,sha256=gDnokfFjw29Kz9qazxtb2clT2pBsuOJqIEErvg7L3hE,4986
|
11
|
+
reywechat/rwechat.py,sha256=xOxki5zFq145V-Ii3q8cFnJkCm8joCftgbbekGoCel0,4718
|
12
|
+
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
+
reywechat-1.0.81.dist-info/METADATA,sha256=rlyCxhuW3cUbQaXedNeU_phFAohqkXBfZr0amsicEgw,1551
|
14
|
+
reywechat-1.0.81.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reywechat-1.0.81.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reywechat-1.0.81.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
|