nonebot-adapter-qq 1.4.4__tar.gz → 1.5.0__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.
Files changed (20) hide show
  1. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/PKG-INFO +2 -3
  2. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/message.py +4 -0
  3. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/pyproject.toml +3 -3
  4. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/LICENSE +0 -0
  5. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/README.md +0 -0
  6. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/__init__.py +0 -0
  7. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/adapter.py +0 -0
  8. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/bot.py +4 -4
  9. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/compat.py +0 -0
  10. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/config.py +0 -0
  11. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/event.py +0 -0
  12. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/exception.py +0 -0
  13. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/models/__init__.py +0 -0
  14. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/models/common.py +0 -0
  15. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/models/guild.py +0 -0
  16. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/models/payload.py +0 -0
  17. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/models/qq.py +0 -0
  18. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/permission.py +0 -0
  19. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/store.py +0 -0
  20. {nonebot_adapter_qq-1.4.4 → nonebot_adapter_qq-1.5.0}/nonebot/adapters/qq/utils.py +0 -0
@@ -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
@@ -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nonebot-adapter-qq"
3
- version = "1.4.4"
3
+ version = "1.5.0"
4
4
  description = "QQ adapter for nonebot2"
5
5
  authors = ["yanyongyu <yyy@nonebot.dev>"]
6
6
  license = "MIT"
@@ -19,14 +19,14 @@ classifiers = [
19
19
  packages = [{ include = "nonebot" }]
20
20
 
21
21
  [tool.poetry.dependencies]
22
- python = "^3.8"
22
+ python = "^3.9"
23
23
  yarl = "^1.9.0"
24
24
  nonebot2 = "^2.2.1"
25
25
  typing-extensions = ">=4.4.0, <5.0.0"
26
26
  pydantic = ">=1.10.0,<3.0.0,!=2.5.0,!=2.5.1"
27
27
 
28
28
  [tool.poetry.group.dev.dependencies]
29
- ruff = "^0.4.0"
29
+ ruff = "^0.5.0"
30
30
  isort = "^5.10.1"
31
31
  black = "^24.0.0"
32
32
  nonemoji = "^0.1.3"
@@ -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"]