satori-python-adapter-onebot11 0.4.0__tar.gz → 0.4.1__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.
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/.mina/adapter_onebot11.toml +1 -1
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/PKG-INFO +1 -1
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/pyproject.toml +1 -1
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/message.py +9 -2
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/LICENSE +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/README.md +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/__init__.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/api.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/events/__init__.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/events/base.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/events/message.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/events/notice.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/events/request.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/forward.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/reverse.py +0 -0
- {satori_python_adapter_onebot11-0.4.0 → satori_python_adapter_onebot11-0.4.1}/src/satori/adapters/onebot11/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: satori-python-adapter-onebot11
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Satori Protocol SDK for python, adapter for OneBot 11
|
|
5
5
|
Home-page: https://github.com/RF-Tar-Railt/satori-python
|
|
6
6
|
Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
|
|
@@ -226,8 +226,13 @@ class OneBot11MessageEncoder:
|
|
|
226
226
|
case "sharp":
|
|
227
227
|
if "id" in attrs:
|
|
228
228
|
self.children.append({"type": "text", "data": {"text": attrs["id"]}})
|
|
229
|
-
case "onebot:face":
|
|
230
|
-
|
|
229
|
+
case "onebot:face" | "emoji":
|
|
230
|
+
if ":" in attrs["id"]:
|
|
231
|
+
_, emj_id_str = attrs["id"].split(":", 1)
|
|
232
|
+
emj_id = int(emj_id_str)
|
|
233
|
+
else:
|
|
234
|
+
emj_id = int(attrs["id"])
|
|
235
|
+
self.children.append({"type": "face", "data": {"id": emj_id}})
|
|
231
236
|
case "a":
|
|
232
237
|
await self.render(_children)
|
|
233
238
|
if "href" in attrs:
|
|
@@ -317,6 +322,8 @@ async def _decode(content: list[MessageSegment], net: OneBotNetwork) -> list[Ele
|
|
|
317
322
|
result.append(E.at_all())
|
|
318
323
|
else:
|
|
319
324
|
result.append(E.at(str(qq), name=seg_data.get("name")))
|
|
325
|
+
case "face":
|
|
326
|
+
result.append(E.emoji(str(seg_data["id"])))
|
|
320
327
|
case "image":
|
|
321
328
|
result.append(E.image(seg_data.get("url") or seg_data.get("file")))
|
|
322
329
|
case "record":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|