# WeChat ClawBot

URL: https://swb.one/zh-Hant/docs/setup/wechat

以擁有者身分登入 SwB。將下方的提示詞交給具備擁有者權限的代理。

https://swb.one/prompts/wechat.md

```
Read the setup guide at https://swb.one/docs/setup/wechat.

Help me connect WeChat ClawBot to the SwB server I host. Give me https://swb.one/docs/connect if I need to connect this agent to SwB first.

Use a SwB client with owner access. Call `connect(what="wechat")`. Ask me whether another agent tool already uses this ClawBot. Call `connect` again with my answer in `choose.existing_binding`. If another agent uses this ClawBot, keep that connection. Connect the agent to SwB through its own integration. Continue with the QR code only when I choose to connect ClawBot to SwB.

Give me the link to the QR code panel at `/connections/wechat` on my SwB server. Ask me to select **Connect**. Ask me to scan the code with my WeChat account. Ask me to confirm the connection in WeChat. If WeChat asks for a PIN, direct me to enter the code in the SwB console. Keep the code in the console.

After ClawBot connects, ask me which agent answers here. Use `targets` to show the choices. Set my choice with `chat_main_set`.

Ask me to send a text message in my one-to-one chat with ClawBot. Ask me to check for a text reply in that chat. If WeChat ends the session, give me the same console link. Ask me to select **Reconnect**. Ask me to scan a new QR code.
```

代理會呼叫 `connect(what="wechat")` 取得連線指引。如果代理工具已在使用 ClawBot，請告訴代理。這種情況下請保留原有連線。若由 SwB 管理 ClawBot，請選擇回覆訊息的代理。

在 SwB 主控台開啟 `/connections/wechat`。選取 **Connect**。用 WeChat 掃描行動條碼。在 WeChat 上確認連線。如果 WeChat 要求 PIN 碼，請在 SwB 主控台輸入該碼。

在與 ClawBot 的一對一聊天中傳送文字訊息。查看同一個聊天中的文字回覆。

如果 WeChat 結束工作階段，請開啟同一個頁面。選取 **Reconnect**。掃描新的行動條碼。

[WeChat ClawBot 模組](/zh-Hant/docs/blocks/wechat)
