diff --git a/src/nonebot_plugin_alconna/__init__.py b/src/nonebot_plugin_alconna/__init__.py index 66cb1bd..b3bd740 100644 --- a/src/nonebot_plugin_alconna/__init__.py +++ b/src/nonebot_plugin_alconna/__init__.py @@ -89,7 +89,7 @@ from .consts import ALCONNA_EXEC_RESULT as ALCONNA_EXEC_RESULT from .extension import add_global_extension as add_global_extension -__version__ = "0.30.0" +__version__ = "0.30.1" __plugin_meta__ = PluginMetadata( name="Alconna 插件", diff --git a/src/nonebot_plugin_alconna/uniseg/__init__.py b/src/nonebot_plugin_alconna/uniseg/__init__.py index 39a282a..6299513 100644 --- a/src/nonebot_plugin_alconna/uniseg/__init__.py +++ b/src/nonebot_plugin_alconna/uniseg/__init__.py @@ -24,7 +24,7 @@ from .params import UniversalMessage as UniversalMessage from .params import UniversalSegment as UniversalSegment -__version__ = "0.30.0" +__version__ = "0.30.1" __plugin_meta__ = PluginMetadata( name="Universal Segment 插件", diff --git a/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py b/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py index 186f89e..416d569 100644 --- a/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py +++ b/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py @@ -45,11 +45,11 @@ async def image(self, seg: Image, bot: Bot) -> "MessageSegment": elif seg.path: image = Path(seg.path).read_bytes() elif seg.raw: - image = seg.raw + image = seg.raw_bytes else: raise SerializeFailed(lang.require("nbp-uniseg", "invalid_segment").format(type="image", seg=seg)) data = {"image_type": "message"} - files = {"image": ("file", image.raw_bytes)} + files = {"image": ("file", image)} params = {"method": "POST", "data": data, "files": files} result = await bot.call_api("im/v1/images", **params) file_key = result["image_key"]