搜索

PythonReactSEOPDF
OpenClaw

onebot-adapter

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

haohaodlam0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install haohaodlam/onebot-adapter-1-0-0

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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
github
Repository
openclaw/skills
Path
skills/haohaodlam/onebot-adapter-1-0-0
Version
1.0.0
Commit
8cd2c90b6a66a51dd9876aa0fdf6570cfcdfe13d
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# 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:
```bash
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:
```bash
python scripts/onebot_ws_listener.py
```

### 3. Send Messages

Use HTTP API to send messages:
```python
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
```python
client.get_login_info()
```

### Get Friend/Group List
```python
client.get_friend_list()
client.get_group_list()
```

### Handle Messages
See [references/message-handling.md](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.

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.