Skip to content

Heychat Adapter

The Heychat (黑盒语音 / Heybox Chat) adapter connects to the official bot platform via WebSocket and HTTP.

Status

Beta — core features implemented

Features

  • WebSocket connection with heartbeat
  • Slash command events (type=50)
  • Channel text messages (type=5, experimental)
  • Send/delete channel messages
  • Room info query

Installation

Open Extensions in the Web console and select the adapter, or run:

bash
onebots ui --data-dir <workspace> --setup

The manager installs the adapter and its required peer dependencies into a verified immutable runtime generation. Do not run package-manager install commands directly in the OneBots runtime directory.

Prerequisites

  1. Complete developer certification at open.xiaoheihe.cn
  2. Create a bot at bot.xiaoheihe.cn and copy the token
  3. Register slash commands in the bot console
  4. Invite the bot into your test room

Configuration

yaml
heychat.my_bot:
  token: 'your_bot_token'
  onebot.v11:
    access_token: 'your_v11_token'

Start

bash
onebots ui --data-dir /path/to/onebots-data

Limitations

  • Requires a long-running process (no webhook mode)
  • Official docs focus on slash commands; type=5 is experimental
  • Bot must be invited into the target room