{"skill":{"slug":"onebot-adapter-1-0-0","displayName":"Onebot Adapter 1.0.0","summary":"Connect OpenClaw to OneBot protocol for QQ bot integration. Use when receiving or sending QQ messages via NapCat or other OneBot servers.","description":"---\nname: onebot-adapter\ndescription: Connect OpenClaw to OneBot protocol for QQ bot integration. Use when receiving or sending QQ messages via NapCat or other OneBot servers.\nversion: 1.0.0\n---\n\n# OneBot Adapter\n\nConnect OpenClaw to OneBot protocol servers like NapCat for QQ bot functionality.\n\n## Quick Start\n\n### 1. Configure Connection\n\nSet OneBot server URL in environment or config:\n```bash\nexport ONEBOT_WS_URL=\"ws://127.0.0.1:3001\"\nexport ONEBOT_HTTP_URL=\"http://127.0.0.1:3000\"\nexport ONEBOT_TOKEN=\"your-token\"\n```\n\n### 2. Receive Messages\n\nUse the WebSocket listener script to receive QQ messages:\n```bash\npython scripts/onebot_ws_listener.py\n```\n\n### 3. Send Messages\n\nUse HTTP API to send messages:\n```python\nfrom scripts.onebot_client import OneBotClient\n\nclient = OneBotClient()\nclient.send_private_msg(user_id=123456, message=\"Hello!\")\nclient.send_group_msg(group_id=789012, message=\"Group message\")\n```\n\n## Connection Modes\n\n### WebSocket (Recommended)\n- Real-time bidirectional communication\n- Receives events instantly\n- Supports both sending and receiving\n\n### HTTP\n- Request-response model\n- Good for simple sending\n- Requires polling for receiving\n\n## Common Tasks\n\n### Get Login Info\n```python\nclient.get_login_info()\n```\n\n### Get Friend/Group List\n```python\nclient.get_friend_list()\nclient.get_group_list()\n```\n\n### Handle Messages\nSee [references/message-handling.md](references/message-handling.md) for message parsing and response patterns.\n\n## NapCat Specific\n\nNapCat is a OneBot11 implementation based on NTQQ.\n\nDefault ports:\n- WebSocket: 3001\n- HTTP: 3000\n- WebUI: 6099\n\nToken authentication is optional but recommended for public deployments.\n\n## Troubleshooting\n\n**Connection refused**: Check if OneBot server is running and ports are correct.\n\n**Authentication failed**: Verify token matches OneBot server configuration.\n\n**Message not delivered**: Check user_id/group_id exists and bot has permission.\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":707,"installsAllTime":27,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772114352354,"updatedAt":1779077392688},"latestVersion":{"version":"1.0.0","createdAt":1772114352354,"changelog":"Initial release of onebot-adapter for QQ bot integration with OpenClaw.\n\n- Connects OpenClaw to OneBot protocol servers (e.g. NapCat) for QQ messaging.\n- Supports both WebSocket (recommended) and HTTP connection modes.\n- Provides scripts and API for receiving and sending private/group messages.\n- Includes setup instructions and troubleshooting tips for authentication and connection issues.","license":null},"metadata":null,"owner":{"handle":"haohaodlam","userId":"s178bjyg62rcv14pym9wpjad7x884xsf","displayName":"haohaodlam","image":"https://avatars.githubusercontent.com/u/2775172?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779962153284}}