nonebot-adapter-qq 1.4.4__py3-none-any.whl → 1.5.0__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.
@@ -327,12 +327,12 @@ class Bot(BaseBot):
327
327
  elif file_image := message["file_image"]:
328
328
  kwargs["file_type"] = 1
329
329
  kwargs["file_data"] = file_image[-1].data["content"]
330
- elif file_audio := message["file_audio"]:
331
- kwargs["file_type"] = 2
332
- kwargs["file_data"] = file_audio[-1].data["content"]
333
330
  elif file_video := message["file_video"]:
334
- kwargs["file_type"] = 3
331
+ kwargs["file_type"] = 2
335
332
  kwargs["file_data"] = file_video[-1].data["content"]
333
+ elif file_audio := message["file_audio"]:
334
+ kwargs["file_type"] = 3
335
+ kwargs["file_data"] = file_audio[-1].data["content"]
336
336
  elif file_file := message["file_file"]:
337
337
  kwargs["file_type"] = 4
338
338
  kwargs["file_data"] = file_file[-1].data["content"]
@@ -428,3 +428,7 @@ class Message(BaseMessage[MessageSegment]):
428
428
  if seg.type
429
429
  in ("text", "emoji", "mention_user", "mention_everyone", "mention_channel")
430
430
  )
431
+
432
+ @override
433
+ def extract_plain_text(self) -> str:
434
+ return "".join(seg.data["text"] for seg in self if seg.is_text())
@@ -1,20 +1,19 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-adapter-qq
3
- Version: 1.4.4
3
+ Version: 1.5.0
4
4
  Summary: QQ adapter for nonebot2
5
5
  Home-page: https://github.com/nonebot/adapter-qq
6
6
  License: MIT
7
7
  Keywords: bot,qq,qqbot,qqguild
8
8
  Author: yanyongyu
9
9
  Author-email: yyy@nonebot.dev
10
- Requires-Python: >=3.8,<4.0
10
+ Requires-Python: >=3.9,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Framework :: Robot Framework
13
13
  Classifier: Framework :: Robot Framework :: Library
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
17
  Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
@@ -1,11 +1,11 @@
1
1
  nonebot/adapters/qq/__init__.py,sha256=u2bR9HLdgIEV22nu2VJeUFscklTUj8DN4650q0k5SHw,787
2
2
  nonebot/adapters/qq/adapter.py,sha256=ivVkSvUFcQEGIp9AmDTwP17HFNnrMmg6LYF1pfORi2s,14464
3
- nonebot/adapters/qq/bot.py,sha256=cxIJKilZbsqP9zn66xlxJJeHV3FexR7HHqS3qjrkR9o,60571
3
+ nonebot/adapters/qq/bot.py,sha256=GggOMoEp8lHU2O7cRsS-LtmyXu14ijJttjSYcJ9M364,60571
4
4
  nonebot/adapters/qq/compat.py,sha256=7g5QvRzWREesZ7MSEhNRh53UZwEyhQlxE3e_KpqQ0pw,768
5
5
  nonebot/adapters/qq/config.py,sha256=rdBWweI0db8-9KQF-lvNLMCMa55PJPOkvn9DVJMprac,2148
6
6
  nonebot/adapters/qq/event.py,sha256=4VvHq7l5aQYmIEBLpjHrCL_neqYBTximeuPHQHnt384,18754
7
7
  nonebot/adapters/qq/exception.py,sha256=8Xa9NwYyO7Ih0owBAC_zmEiIRAA8GjgQcoJcF5ogo0g,2701
8
- nonebot/adapters/qq/message.py,sha256=JQsK9SDVXq_5FKnH6gLtbVXSgTnKPoNwA9Yhzrm6Z6c,11292
8
+ nonebot/adapters/qq/message.py,sha256=JjUeqqMaw3N5-STrcvmjcWNx9VCSBGaLuZB4jg4gpM8,11422
9
9
  nonebot/adapters/qq/models/__init__.py,sha256=AahR-O5B_1c8dMXHpDH68o4qojhF3vf4UPDGyH2MKjA,537
10
10
  nonebot/adapters/qq/models/common.py,sha256=AgGtLf2vC_rxluKFp26PTq0nFFPKuI_ALcGKdwped7A,4468
11
11
  nonebot/adapters/qq/models/guild.py,sha256=ZVSqYfm0_gP5hiTTQoPjhWZ06e7XzdaIVsPDyc2WrVs,11692
@@ -14,7 +14,7 @@ nonebot/adapters/qq/models/qq.py,sha256=zzpHdXgSHoiT-tPyjmR2YjL4IZpLogc-tvAThh7W
14
14
  nonebot/adapters/qq/permission.py,sha256=0aedypl6xymhAV3UkW0vlvHTBkJeDmOef3SxG2tPcHQ,988
15
15
  nonebot/adapters/qq/store.py,sha256=X-NeSVCrxngQDPo9IXKWehERNa4sefdrYrZn5-yucF4,874
16
16
  nonebot/adapters/qq/utils.py,sha256=rMHpOf1zUrVodCYULMTBr82pF54tGK3b5TMykSnY6jc,1568
17
- nonebot_adapter_qq-1.4.4.dist-info/LICENSE,sha256=4EZBnkZPQYBvtO2KFGaUQHTO8nZ26pGeaCFchdBq_AE,1064
18
- nonebot_adapter_qq-1.4.4.dist-info/METADATA,sha256=UKdNJV7sHauTPKGloYluCatTS9TIZ0Fx66fqROdpdZg,2785
19
- nonebot_adapter_qq-1.4.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
20
- nonebot_adapter_qq-1.4.4.dist-info/RECORD,,
17
+ nonebot_adapter_qq-1.5.0.dist-info/LICENSE,sha256=4EZBnkZPQYBvtO2KFGaUQHTO8nZ26pGeaCFchdBq_AE,1064
18
+ nonebot_adapter_qq-1.5.0.dist-info/METADATA,sha256=2UfZxU96zeAyAqSAyAdQ0K7_mq41IjnG-LzmWIemJNE,2735
19
+ nonebot_adapter_qq-1.5.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
20
+ nonebot_adapter_qq-1.5.0.dist-info/RECORD,,