fix(wecom): await async disconnect, add SDK attribution in README

This commit is contained in:
Re-bin
2026-03-11 08:04:14 +00:00
parent 0dff7d374e
commit 7ceddcded6
2 changed files with 4 additions and 5 deletions

View File

@@ -681,7 +681,9 @@ nanobot gateway
<details> <details>
<summary><b>Wecom (企业微信)</b></summary> <summary><b>Wecom (企业微信)</b></summary>
Uses **WebSocket** long connection — no public IP required. > Here we use [wecom-aibot-sdk-python](https://github.com/chengyongru/wecom_aibot_sdk) (community Python version of the official [@wecom/aibot-node-sdk](https://www.npmjs.com/package/@wecom/aibot-node-sdk)).
>
> Uses **WebSocket** long connection — no public IP required.
**1. Install the optional dependency** **1. Install the optional dependency**
@@ -714,9 +716,6 @@ Go to the WeCom admin console → Intelligent Robot → Create Robot → select
nanobot gateway nanobot gateway
``` ```
> [!TIP]
> WeCom uses WebSocket to receive messages — no webhook or public IP needed!
</details> </details>
## 🌐 Agent Social Network ## 🌐 Agent Social Network

View File

@@ -98,7 +98,7 @@ class WecomChannel(BaseChannel):
"""Stop the WeCom bot.""" """Stop the WeCom bot."""
self._running = False self._running = False
if self._client: if self._client:
self._client.disconnect() await self._client.disconnect()
logger.info("WeCom bot stopped") logger.info("WeCom bot stopped")
async def _on_connected(self, frame: Any) -> None: async def _on_connected(self, frame: Any) -> None: