From f340b53782c8781f9109b606e9288375aee4a754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=85=E8=AF=BA=E7=8B=90?= <212194964+foxcyber907@users.noreply.github.com> Date: Wed, 13 Aug 2025 11:07:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?platform=E7=8E=B0=E5=9C=A8=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin_system/apis/send_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin_system/apis/send_api.py b/src/plugin_system/apis/send_api.py index 80154f145..f28e66f3d 100644 --- a/src/plugin_system/apis/send_api.py +++ b/src/plugin_system/apis/send_api.py @@ -411,7 +411,7 @@ async def custom_to_stream( async def adapter_command_to_stream( action: str, params: dict, - platform: str, + platform: Optional[str] = None, stream_id: Optional[str] = None, timeout: float = 30.0, storage_message: bool = False @@ -431,6 +431,9 @@ async def adapter_command_to_stream( dict: 适配器返回的响应,格式为 {"status": "ok/failed", "data": {...}, "message": "..."} 如果发送失败则返回 {"status": "error", "message": "错误信息"} """ + if not stream_id and not platform: + raise ValueError("必须提供stream_id或platform参数") + try: logger.debug(f"[SendAPI] 向适配器发送命令: {action}") From 65871ed7b228c5c68512abe80272db6b5b23cf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=85=E8=AF=BA=E7=8B=90?= <212194964+foxcyber907@users.noreply.github.com> Date: Wed, 13 Aug 2025 11:14:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/bot_config_template.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index 65cfd79c9..d96ca1729 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -1,5 +1,5 @@ [inner] -version = "6.2.6" +version = "6.2.7" #----以下是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读---- #如果你想要修改配置文件,请递增version的值