onebot-adapter

Connect OpenClaw to OneBot protocol for QQ bot integration. Use when receiving or sending QQ messages via NapCat or other OneBot servers.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "onebot-adapter" with this command: npx skills add onebot-adapter

OneBot Adapter

Connect OpenClaw to OneBot protocol servers like NapCat for QQ bot functionality.

Quick Start

1. Configure Connection

Set OneBot server URL in environment or config:

export ONEBOT_WS_URL="ws://127.0.0.1:3001"
export ONEBOT_HTTP_URL="http://127.0.0.1:3000"
export ONEBOT_TOKEN="your-token"

2. Receive Messages

Use the WebSocket listener script to receive QQ messages:

python scripts/onebot_ws_listener.py

3. Send Messages

Use HTTP API to send messages:

from scripts.onebot_client import OneBotClient

client = OneBotClient()
client.send_private_msg(user_id=123456, message="Hello!")
client.send_group_msg(group_id=789012, message="Group message")

Connection Modes

WebSocket (Recommended)

  • Real-time bidirectional communication
  • Receives events instantly
  • Supports both sending and receiving

HTTP

  • Request-response model
  • Good for simple sending
  • Requires polling for receiving

Common Tasks

Get Login Info

client.get_login_info()

Get Friend/Group List

client.get_friend_list()
client.get_group_list()

Handle Messages

See references/message-handling.md for message parsing and response patterns.

NapCat Specific

NapCat is a OneBot11 implementation based on NTQQ.

Default ports:

  • WebSocket: 3001
  • HTTP: 3000
  • WebUI: 6099

Token authentication is optional but recommended for public deployments.

Troubleshooting

Connection refused: Check if OneBot server is running and ports are correct.

Authentication failed: Verify token matches OneBot server configuration.

Message not delivered: Check user_id/group_id exists and bot has permission.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

OpenClaw OneBot

OneBot 11 channel plugin for QQ messaging (NapCat/go-cqhttp). Native OpenClaw integration with private/group chat, group reactions, block streaming, voice pi...

Registry SourceRecently Updated
8250Profile unavailable
Automation

wechat-group-qa/

从企业微信群提取学员提问,按课程阶段分类并生成表格。当用户在企业微信群里@机器人提问时,自动记录问题并整理。

Registry SourceRecently Updated
2990Profile unavailable
Automation

飞书任务Bot身份

飞书任务(Bot身份):使用Bot/应用身份管理飞书任务,创建任务、查询任务列表、更新状态、分配成员等。本Skill专门使用v1 API,Bot身份可直接调用,解决了lark-task官方Skill使用v2接口无法支持Bot身份的问题。当需要以Bot身份(应用身份)操作任务时使用本Skill。

Registry SourceRecently Updated
1170Profile unavailable
Automation

微信QQ自动发消息

Windows 平台微信和 QQ 自动发消息工具。支持搜索联系人、发送消息、截图OCR分析、智能回复建议(需用户确认后发送)。

Registry SourceRecently Updated
1.2K4Profile unavailable