OneBotConnecter 0.3.14__tar.gz → 0.3.15__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OneBotConnecter
3
- Version: 0.3.14
3
+ Version: 0.3.15
4
4
  Summary: 基于websocket(服务器正向)连接的onebot11通用python接口
5
5
  Author-email: Sugar51243 <1733682365@qq.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "OneBotConnecter"
7
- version = "0.3.14"
7
+ version = "0.3.15"
8
8
  authors = [
9
9
  { name="Sugar51243", email="1733682365@qq.com" },
10
10
  ]
@@ -304,12 +304,16 @@ class OneBot:
304
304
  msg = MessageChain([ReplyMessage(message_id), AtMessage(user_id), " "])
305
305
  msg.add(sendMessage)
306
306
  callback = await self.send_group_msg(group_id, msg)
307
- except:
307
+ except KeyError:
308
308
  user_id = getMessage["user_id"]
309
309
  message_id = getMessage["message_id"]
310
310
  msg = MessageChain([ReplyMessage(message_id), " "])
311
311
  msg.add(sendMessage)
312
312
  callback = await self.send_private_msg(user_id, msg)
313
+ except Exception as e:
314
+ tb = e.__traceback__
315
+ formatted_tb = ''.join(traceback.format_tb(tb))
316
+ print(f"回复信息时报错: \n{formatted_tb}", needPrint=self.testMode)
313
317
  return callback
314
318
  #长连接接收消息
315
319
  async def events(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OneBotConnecter
3
- Version: 0.3.14
3
+ Version: 0.3.15
4
4
  Summary: 基于websocket(服务器正向)连接的onebot11通用python接口
5
5
  Author-email: Sugar51243 <1733682365@qq.com>
6
6
  License: MIT License