reywechat 1.0.85__py3-none-any.whl → 1.0.86__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/rdb.py CHANGED
@@ -25,18 +25,18 @@ from .rwechat import WeChat
25
25
 
26
26
 
27
27
  __all__ = (
28
- 'DatabaseTableContactUser',
29
- 'DatabaseTableContactRoom',
30
- 'DatabaseTableContactRoomUser',
31
- 'DatabaseTableMessageReceive',
32
- 'DatabaseTableMessageSend',
28
+ 'DatabaseORMTableContactUser',
29
+ 'DatabaseORMTableContactRoom',
30
+ 'DatabaseORMTableContactRoomUser',
31
+ 'DatabaseORMTableMessageReceive',
32
+ 'DatabaseORMTableMessageSend',
33
33
  'WeChatDatabase'
34
34
  )
35
35
 
36
36
 
37
- class DatabaseTableContactUser(rorm.Model, table=True):
37
+ class DatabaseORMTableContactUser(rorm.Model, table=True):
38
38
  """
39
- Database `contact_user` table model.
39
+ Database `contact_user` table ORM model.
40
40
  """
41
41
 
42
42
  __name__ = 'contact_user'
@@ -49,9 +49,9 @@ class DatabaseTableContactUser(rorm.Model, table=True):
49
49
  valid: int = rorm.Field(rorm.types_mysql.TINYINT(unsigned=True), field_default='1', not_null=True, comment='Is the valid, 0 is invalid, 1 is valid.')
50
50
 
51
51
 
52
- class DatabaseTableContactRoom(rorm.Model, table=True):
52
+ class DatabaseORMTableContactRoom(rorm.Model, table=True):
53
53
  """
54
- Database `contact_room` table model.
54
+ Database `contact_room` table ORM model.
55
55
  """
56
56
 
57
57
  __name__ = 'contact_room'
@@ -64,9 +64,9 @@ class DatabaseTableContactRoom(rorm.Model, table=True):
64
64
  valid: int = rorm.Field(rorm.types_mysql.TINYINT(unsigned=True), field_default='1', not_null=True, comment='Is the valid, 0 is invalid, 1 is valid.')
65
65
 
66
66
 
67
- class DatabaseTableContactRoomUser(rorm.Model, table=True):
67
+ class DatabaseORMTableContactRoomUser(rorm.Model, table=True):
68
68
  """
69
- Database `contact_room_user` table model.
69
+ Database `contact_room_user` table ORM model.
70
70
  """
71
71
 
72
72
  __name__ = 'contact_room_user'
@@ -80,9 +80,9 @@ class DatabaseTableContactRoomUser(rorm.Model, table=True):
80
80
  valid: int = rorm.Field(rorm.types_mysql.TINYINT(unsigned=True), field_default='1', not_null=True, comment='Is the valid, 0 is invalid, 1 is valid.')
81
81
 
82
82
 
83
- class DatabaseTableMessageReceive(rorm.Model, table=True):
83
+ class DatabaseORMTableMessageReceive(rorm.Model, table=True):
84
84
  """
85
- Database `message_receive` table model.
85
+ Database `message_receive` table ORM model.
86
86
  """
87
87
 
88
88
  __name__ = 'message_receive'
@@ -137,9 +137,9 @@ class DatabaseTableMessageReceive(rorm.Model, table=True):
137
137
  file_id: int = rorm.Field(rorm.types_mysql.MEDIUMINT(unsigned=True), comment='Message file ID, from the file database.')
138
138
 
139
139
 
140
- class DatabaseTableMessageSend(rorm.Model, table=True):
140
+ class DatabaseORMTableMessageSend(rorm.Model, table=True):
141
141
  """
142
- Database `message_send` table model.
142
+ Database `message_send` table ORM model.
143
143
  """
144
144
 
145
145
  __name__ = 'message_send'
@@ -204,7 +204,7 @@ class WeChatDatabase(WeChatBase):
204
204
  `Key 'file'`: `Database` instance used in file methods.
205
205
  """
206
206
 
207
- # Set attribute.
207
+ # Build attribute.
208
208
  self.wechat = wechat
209
209
  match db:
210
210
  case Database():
@@ -215,6 +215,9 @@ class WeChatDatabase(WeChatBase):
215
215
  case _:
216
216
  throw(TypeError, db)
217
217
 
218
+ # Build Database.
219
+ self.build_db()
220
+
218
221
  # Add handler.
219
222
  self.__add_receiver_handler_to_contact_user()
220
223
  self.__add_receiver_handler_to_contact_room()
@@ -240,11 +243,11 @@ class WeChatDatabase(WeChatBase):
240
243
 
241
244
  ## Table.
242
245
  tables = [
243
- DatabaseTableContactUser,
244
- DatabaseTableContactRoom,
245
- DatabaseTableContactRoomUser,
246
- DatabaseTableMessageReceive,
247
- DatabaseTableMessageSend
246
+ DatabaseORMTableContactUser,
247
+ DatabaseORMTableContactRoom,
248
+ DatabaseORMTableContactRoomUser,
249
+ DatabaseORMTableMessageReceive,
250
+ DatabaseORMTableMessageSend
248
251
  ]
249
252
 
250
253
  ## View stats.
reywechat/rreceive.py CHANGED
@@ -113,10 +113,6 @@ class WeChatMessage(WeChatBase):
113
113
  display : Message description text.
114
114
  data : Message source data.
115
115
  window : Message sende window ID.
116
-
117
- Attributes
118
- ----------
119
- is_test : Whether add test text to before reply text.
120
116
  """
121
117
 
122
118
  # Import.
@@ -138,6 +134,7 @@ class WeChatMessage(WeChatBase):
138
134
  self.trigger_break = self.receiver.trigger.break_
139
135
  self.exc_reports: list[str] = []
140
136
  self.is_test: bool = False
137
+ 'Whether add test text to before reply text.'
141
138
 
142
139
  ## Room and user.
143
140
  if self.window.endswith('chatroom'):
reywechat/rsend.py CHANGED
@@ -34,43 +34,37 @@ __all__ = (
34
34
  class WeChatSendTypeEnum(WeChatBase, IntEnum):
35
35
  """
36
36
  WeChat send type enumeration type.
37
-
38
- Attributes
39
- ----------
40
- TEXT : Send text message.
41
- TEXT_AT : Send text message with @.
42
- FILE : Send file message.
43
- IMAGE : Send image message.
44
- EMOTION : Send emotion message.
45
- PAT : Send pat message.
46
- PUBLIC : Send public account message.
47
- FORWARD : Forward message.
48
37
  """
49
38
 
50
39
  TEXT = 0
40
+ 'Send text message.'
51
41
  TEXT_AT = 1
42
+ 'Send text message with @.'
52
43
  FILE = 2
44
+ 'Send file message.'
53
45
  IMAGE = 3
46
+ 'Send image message.'
54
47
  EMOTION = 4
48
+ 'Send emotion message.'
55
49
  PAT = 5
50
+ 'Send pat message.'
56
51
  PUBLIC = 6
52
+ 'Send public account message.'
57
53
  FORWARD = 7
54
+ 'Forward message.'
58
55
 
59
56
 
60
57
  class WeChatSendStatusEnum(WeChatBase, IntEnum):
61
58
  """
62
59
  WeChat send status enumeration type.
63
-
64
- Attributes
65
- ----------
66
- INIT : After initialization, before inserting into the database queue.
67
- WAIT : After get from database queue, before sending.
68
- SENT : After sending.
69
60
  """
70
61
 
71
62
  INIT = 0
63
+ 'After initialization, before inserting into the database queue.'
72
64
  WAIT = 1
65
+ 'After get from database queue, before sending.'
73
66
  SENT = 2
67
+ 'After sending.'
74
68
 
75
69
 
76
70
  class WeChatSendParameters(WeChatBase):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reywechat
3
- Version: 1.0.85
3
+ Version: 1.0.86
4
4
  Summary: WeChat client control method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reywechat/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -3,14 +3,14 @@ reywechat/rall.py,sha256=5J_X-XMOyb1Vp1jyS9-oRFXGOtp2vRPX1g3tJot_Eck,371
3
3
  reywechat/rbase.py,sha256=hbxn5spvcl_C_Bw8A9teulOXT9GMlxUw145_YbXIOzc,1124
4
4
  reywechat/rcache.py,sha256=5FIa8UB3VsLHT_EXHHmFP62a5AeS22anJCJXC8t4tWw,908
5
5
  reywechat/rclient.py,sha256=EaX6lciZhINg_3m76b7s29cZj5D4o1ASZlLzeVbcSlk,22579
6
- reywechat/rdb.py,sha256=Bz7dvLM-5oBlHqx_mqw-nQMFlYm4gA646fBkNnDMYi8,37882
6
+ reywechat/rdb.py,sha256=uvax59u-lhh_GB0RxF14OZfuI9J8vNTvL7tOKAb85ow,38003
7
7
  reywechat/rlog.py,sha256=sCTk1SSN3uP3zKzUN2aMZSA-GWrN_1g1Mmus2pVEp2M,5244
8
- reywechat/rreceive.py,sha256=XAWgcI4txoxu0HITYcdsbfU6G6ENP1Edn9egXuFYEFQ,50944
9
- reywechat/rsend.py,sha256=777RKnwuJk2A6bWT9TbzYaa2mjyqccNbO2dbj4mLMtA,20052
8
+ reywechat/rreceive.py,sha256=blVyP-TVdAm711lk4O3_IiTsFx-qayzGe807ig6OpGg,50894
9
+ reywechat/rsend.py,sha256=4Qjn8TnB4MAPfIE7xfPFnkN_Rqdc7g69Ud8_Xya994I,19918
10
10
  reywechat/rtrigger.py,sha256=rVSJhHcZXbSeyNZeMQbaOi8wGvzeEYv_hMAw4qnSWeQ,4982
11
11
  reywechat/rwechat.py,sha256=wh04IT0s-QrGcnVe_fJxL3mYNLWcUuYgjDiupBB0ESk,4714
12
12
  reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
13
- reywechat-1.0.85.dist-info/METADATA,sha256=8vw8wu7rBzmy8RD4YZQBPA_DexDR4l5IqHOp7Bxtl5k,1575
14
- reywechat-1.0.85.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- reywechat-1.0.85.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
- reywechat-1.0.85.dist-info/RECORD,,
13
+ reywechat-1.0.86.dist-info/METADATA,sha256=CqpXiDQ3sFah9pkIbJlOjZOUiIdRZ9Eyw_-VD7-Mzxc,1575
14
+ reywechat-1.0.86.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ reywechat-1.0.86.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
+ reywechat-1.0.86.dist-info/RECORD,,