npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onebots/adapter-kook

v1.0.0

Published

onebots KOOK(开黑了)适配器

Readme

@onebots/adapter-kook

onebots KOOK (开黑了) 适配器

简介

这是一个用于 onebots 框架的 KOOK(原开黑了)平台适配器。KOOK 是一个面向游戏玩家的即时通讯平台,类似于 Discord。

功能特性

  • ✅ WebSocket 和 Webhook 两种连接模式
  • ✅ 频道消息收发
  • ✅ 私聊消息收发
  • ✅ 服务器(公会)管理
  • ✅ 频道管理
  • ✅ 成员管理
  • ✅ 角色管理
  • ✅ 表情回应
  • ✅ 文件上传
  • ✅ KMarkdown 消息格式支持
  • ✅ 卡片消息支持

安装

npm install @onebots/adapter-kook
# 或
pnpm add @onebots/adapter-kook

配置

在配置文件中添加 KOOK 账号:

accounts:
  - platform: kook
    account_id: your_bot_id
    token: your_bot_token
    mode: websocket  # 或 webhook
    verifyToken: your_verify_token  # Webhook 模式需要
    encryptKey: your_encrypt_key  # 可选,消息加密密钥

配置项说明

| 配置项 | 类型 | 必填 | 说明 | |--------|------|------|------| | account_id | string | 是 | 机器人账号 ID | | token | string | 是 | 机器人 Token | | mode | string | 否 | 连接模式:websocket(默认)或 webhook | | verifyToken | string | 否 | Webhook 验证 Token | | encryptKey | string | 否 | 消息加密密钥 |

获取 Token

  1. 访问 KOOK 开发者平台
  2. 创建应用并添加机器人
  3. 在机器人设置中获取 Token

消息类型支持

发送消息

支持的消息段类型:

  • text - 文本消息
  • at - @用户/全体成员/在线成员
  • image - 图片消息
  • face - 表情

接收消息

支持的消息类型:

  • 文字消息
  • KMarkdown 消息
  • 图片消息
  • 视频消息
  • 文件消息
  • 音频消息
  • 卡片消息

API 支持

消息相关

  • sendMessage - 发送消息
  • deleteMessage - 删除消息
  • getMessage - 获取消息
  • updateMessage - 更新消息

用户相关

  • getLoginInfo - 获取机器人信息
  • getUserInfo - 获取用户信息
  • getFriendList - 获取私聊会话列表
  • getFriendInfo - 获取好友信息

服务器相关

  • getGroupList - 获取服务器列表
  • getGroupInfo - 获取服务器信息
  • leaveGroup - 退出服务器
  • getGroupMemberList - 获取服务器成员列表
  • getGroupMemberInfo - 获取成员信息
  • kickGroupMember - 踢出成员
  • setGroupCard - 设置成员昵称

频道相关

  • getChannelList - 获取频道列表
  • getChannelInfo - 获取频道信息
  • createChannel - 创建频道
  • updateChannel - 更新频道
  • deleteChannel - 删除频道
  • getChannelMemberList - 获取频道成员列表

公会相关

  • getGuildList - 获取服务器列表
  • getGuildInfo - 获取服务器信息
  • getGuildMemberInfo - 获取成员信息

事件支持

消息事件

  • 频道消息
  • 私聊消息

通知事件

  • 成员加入服务器
  • 成员离开服务器
  • 表情回应添加
  • 消息更新
  • 消息删除

许可证

MIT