reywechat 1.0.56__py3-none-any.whl → 1.0.57__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/rreceive.py +2 -2
- reywechat/rsend.py +66 -0
- {reywechat-1.0.56.dist-info → reywechat-1.0.57.dist-info}/METADATA +1 -1
- {reywechat-1.0.56.dist-info → reywechat-1.0.57.dist-info}/RECORD +6 -6
- {reywechat-1.0.56.dist-info → reywechat-1.0.57.dist-info}/WHEEL +0 -0
- {reywechat-1.0.56.dist-info → reywechat-1.0.57.dist-info}/licenses/LICENSE +0 -0
reywechat/rreceive.py
CHANGED
@@ -378,7 +378,7 @@ class WeChatMessage(WeChatBase):
|
|
378
378
|
|
379
379
|
### File uploaded.
|
380
380
|
elif self.is_file_uploaded:
|
381
|
-
self._text = f'[文件"{self.file['name']}"
|
381
|
+
self._text = f'[文件"{self.file['name']}"发送完成]'
|
382
382
|
|
383
383
|
### Initiate real time location.
|
384
384
|
elif self.share_type == 17:
|
@@ -421,7 +421,7 @@ class WeChatMessage(WeChatBase):
|
|
421
421
|
|
422
422
|
### File uploading.
|
423
423
|
elif self.is_file_uploading:
|
424
|
-
self._text = f'[文件"{self.file_name_uploading}"
|
424
|
+
self._text = f'[文件"{self.file_name_uploading}"发送中]'
|
425
425
|
|
426
426
|
### Transfer money.
|
427
427
|
elif self.is_money:
|
reywechat/rsend.py
CHANGED
@@ -194,6 +194,72 @@ class WeChatSendParameter(WeChatBase):
|
|
194
194
|
self.exc_reports: list[str] = []
|
195
195
|
self.status: WeChatSendStatusEnum
|
196
196
|
|
197
|
+
## Cache.
|
198
|
+
self._text: str | None = None
|
199
|
+
|
200
|
+
|
201
|
+
@property
|
202
|
+
def text(self) -> str:
|
203
|
+
"""
|
204
|
+
Text description of parameter content.
|
205
|
+
|
206
|
+
Returns
|
207
|
+
-------
|
208
|
+
Text.
|
209
|
+
"""
|
210
|
+
|
211
|
+
# Cache.
|
212
|
+
if self._text is not None:
|
213
|
+
return self._text
|
214
|
+
|
215
|
+
# Get.
|
216
|
+
match self.send_type:
|
217
|
+
|
218
|
+
## Text.
|
219
|
+
case WeChatSendTypeEnum.TEXT:
|
220
|
+
self._text = self.params['text']
|
221
|
+
|
222
|
+
## Text with '@'.
|
223
|
+
case WeChatSendTypeEnum.TEXT_AT:
|
224
|
+
self._text = self.params['text']
|
225
|
+
|
226
|
+
## File.
|
227
|
+
case WeChatSendTypeEnum.FILE:
|
228
|
+
self._text = f'[文件"{self.params['file_name']}"发送]'
|
229
|
+
|
230
|
+
## Image.
|
231
|
+
case WeChatSendTypeEnum.IMAGE:
|
232
|
+
self._text = f'[图片"{self.params['file_name']}"发送]'
|
233
|
+
|
234
|
+
## Emotion.
|
235
|
+
case WeChatSendTypeEnum.EMOTION:
|
236
|
+
self._text = f'[动画表情"{self.params['file_name']}"发送]'
|
237
|
+
|
238
|
+
## Pat.
|
239
|
+
case WeChatSendTypeEnum.PAT:
|
240
|
+
user_name = self.sender.wechat.client.get_contact_name(self.params['user_id'])
|
241
|
+
self._text = f'[我拍了拍"{user_name}"]'
|
242
|
+
|
243
|
+
## Public account.
|
244
|
+
case WeChatSendTypeEnum.PUBLIC:
|
245
|
+
self._text = f'[公众号"{self.params['title']}"分享]'
|
246
|
+
public_name = self.params.get('public_name')
|
247
|
+
text = self.params.get('public_name')
|
248
|
+
if public_name is not None:
|
249
|
+
self._text += f' {public_name}'
|
250
|
+
if text is not None:
|
251
|
+
self._text += f' {text}'
|
252
|
+
|
253
|
+
## Forward.
|
254
|
+
case WeChatSendTypeEnum.FORWARD:
|
255
|
+
self._text = '[转发了一条消息]'
|
256
|
+
|
257
|
+
## Throw exception.
|
258
|
+
case send_type:
|
259
|
+
throw(ValueError, send_type)
|
260
|
+
|
261
|
+
return self._text
|
262
|
+
|
197
263
|
|
198
264
|
class WeChatSender(WeChatBase):
|
199
265
|
"""
|
@@ -5,12 +5,12 @@ reywechat/rcache.py,sha256=7UsHHfgFOgxuSqlTSAO6CprgUUOeBCXYus0kxmRBQxk,908
|
|
5
5
|
reywechat/rclient.py,sha256=lc1CPle9h08mwP8NlJN0ybzcNJxtpV0ma6q6cz1RIxk,22518
|
6
6
|
reywechat/rdb.py,sha256=4or5HV_U4mZwRSiK1fa1wZkhh_KfdtkYoWkEdBDov_Q,48351
|
7
7
|
reywechat/rlog.py,sha256=4EsTgrgC05JvWeKAucUaWGga638CRRJISJN6qncBCAw,5249
|
8
|
-
reywechat/rreceive.py,sha256=
|
9
|
-
reywechat/rsend.py,sha256=
|
8
|
+
reywechat/rreceive.py,sha256=nNSBDfCwFUK2eiDRgLey1o6uQ4GaaQLGpwrsHjB6nbU,51581
|
9
|
+
reywechat/rsend.py,sha256=yrJf9GzWVCDptUHHazhWSVW0nm2LCIbb0sz2EII63bY,20049
|
10
10
|
reywechat/rtrigger.py,sha256=WdOQwobPdGPyyE9J-qtQFPd60713T0aWqKk02PLdCRE,4966
|
11
11
|
reywechat/rwechat.py,sha256=g0pbprMPv_qWb_lGFrPDAWsJO4vPSIgFLkw0Y28CZUo,4751
|
12
12
|
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
-
reywechat-1.0.
|
14
|
-
reywechat-1.0.
|
15
|
-
reywechat-1.0.
|
16
|
-
reywechat-1.0.
|
13
|
+
reywechat-1.0.57.dist-info/METADATA,sha256=9lWZLh4_IdPQ6gTZNmnN0SSBpioFASdjwpmpEjHLO4E,1551
|
14
|
+
reywechat-1.0.57.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reywechat-1.0.57.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reywechat-1.0.57.dist-info/RECORD,,
|
File without changes
|
File without changes
|