Skip to main content

OneBot

OneBot is a protocol compatible with various QQ bots (NapCat, Go-CQHTTP, etc.).

Setup

1. Start a OneBot-Compatible Client

Examples:

  • NapCat — modern QQ protocol implementation
  • Go-CQHTTP — classic implementation

Configure it to expose a WebSocket reverse server.

2. Configure PicoClaw

{
"channels": {
"onebot": {
"enabled": true,
"ws_url": "ws://127.0.0.1:3001",
"access_token": "",
"reconnect_interval": 5,
"group_trigger_prefix": [],
"allow_from": []
}
}
}
FieldTypeDescription
ws_urlstringWebSocket URL of the OneBot client
access_tokenstringAccess token (if configured)
reconnect_intervalintReconnect interval in seconds
group_trigger_prefixarrayPrefixes that trigger bot response in groups
allow_fromarrayAllowed QQ user IDs

3. Run

picoclaw gateway
note

Full OneBot documentation is available in Chinese in the repository at docs/channels/onebot/README.zh.md.