Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
feat: improve QQ channel setup guide and fix botpy intent flags
Re-bin4f928e9d2a27
diff --git a/README.md b/README.mdindex 7e1f80be3..eb2ff7f3d 100644--- a/README.md+++ b/README.md@@ -341,16 +341,24 @@ nanobot gateway</details><details>-<summary><b>QQ (QQ私聊)</b></summary>+<summary><b>QQ (QQ单聊)</b></summary>-Uses **botpy SDK** with WebSocket — no public IP required.+Uses **botpy SDK** with WebSocket — no public IP required. Currently supports **private messages only**.-**1. Create a QQ bot**-- Visit [QQ Open Platform](https://q.qq.com)+**1. Register & create bot**+- Visit [QQ Open Platform](https://q.qq.com) → Register as a developer (personal or enterprise)- Create a new bot application-- Get **AppID** and **Secret** from "Developer Settings"+- Go to **开发设置 (Developer Settings)** → copy **AppID** and **AppSecret**-**2. Configure**+**2. Set up sandbox for testing**+- In the bot management console, find **沙箱配置 (Sandbox Config)**+- Under **在消息列表配置**, click **添加成员** and add your own QQ number+- Once added, scan the bot's QR code with mobile QQ → open the bot profile → tap "发消息" to start chatting++**3. Configure**++> - `allowFrom`: Leave empty for public access, or add user openids to restrict. You can find openids in the nanobot logs when a user messages the bot.+> - For production: submit a review in the bot console and publish. See [QQ Bot Docs](https://bot.q.qq.com/wiki/) for the full publishing flow.```json{@@ -365,17 +373,13 @@ Uses **botpy SDK** with WebSocket — no public IP required.}```-> `allowFrom`: Leave empty for public access, or add user openids to restrict access.-> Example: `"allowFrom": ["user_openid_1", "user_openid_2"]`--**3. Run**+**4. Run**```bashnanobot gateway```-> [!TIP]-> QQ bot currently supports **private messages only**. Group chat support coming soon!+Now send a message to the bot from QQ — it should respond!</details>diff --git a/nanobot/channels/qq.py b/nanobot/channels/qq.pyindex e3efb4f74..5964d30a7 100644--- a/nanobot/channels/qq.py+++ b/nanobot/channels/qq.py@@ -27,7 +27,7 @@ if TYPE_CHECKING:def _make_bot_class(channel: "QQChannel") -> "type[botpy.Client]":"""Create a botpy Client subclass bound to the given channel."""- intents = botpy.Intents(c2c_message=True)+ intents = botpy.Intents(public_messages=True, direct_message=True)class _Bot(botpy.Client):def __init__(self):