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-feishu

v1.0.0

Published

onebots 飞书适配器

Readme

@onebots/adapter-feishu

onebots 飞书/Lark 适配器,同时支持飞书(国内版)和 Lark(国际版)。

安装

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

配置

config.yaml 中配置:

# 飞书(国内版)- 默认
feishu.feishu_bot:
  app_id: "YOUR_APP_ID"
  app_secret: "YOUR_APP_SECRET"
  encrypt_key: "YOUR_ENCRYPT_KEY"  # 可选,事件加密密钥
  verification_token: "YOUR_VERIFICATION_TOKEN"  # 可选,事件验证 Token

# Lark(国际版)
feishu.lark_bot:
  app_id: "YOUR_APP_ID"
  app_secret: "YOUR_APP_SECRET"
  endpoint: "https://open.larksuite.com/open-apis"  # Lark 端点

端点配置

| 端点 | URL | 说明 | |------|-----|------| | 飞书(默认) | https://open.feishu.cn/open-apis | 国内版 | | Lark | https://open.larksuite.com/open-apis | 国际版 |

TypeScript 配置(推荐)

import { FeishuEndpoint } from '@onebots/adapter-feishu';

// 飞书(国内版)
{
  account_id: 'feishu_bot',
  app_id: 'cli_xxx',
  app_secret: 'xxx',
  // endpoint 可省略,默认为 FeishuEndpoint.FEISHU
}

// Lark(国际版)
{
  account_id: 'lark_bot',
  app_id: 'cli_xxx',
  app_secret: 'xxx',
  endpoint: FeishuEndpoint.LARK,
}

// 私有化部署
{
  account_id: 'private_bot',
  app_id: 'cli_xxx',
  app_secret: 'xxx',
  endpoint: 'https://your-private-feishu.com/open-apis',
}

使用

onebots -r feishu

功能

  • ✅ 单聊消息收发
  • ✅ 群聊消息收发
  • ✅ 文本消息
  • ✅ 富文本消息(部分支持)
  • ✅ 消息编辑和删除
  • ✅ 群组管理(获取信息、踢出成员等)
  • ✅ 事件订阅(Webhook)
  • ✅ 支持飞书和 Lark 双端点

获取应用凭证

飞书(国内版)

  1. 访问 飞书开放平台
  2. 创建企业自建应用
  3. 获取 App IDApp Secret
  4. 配置事件订阅 URL(Webhook)
  5. 配置应用权限(消息收发、通讯录等)

Lark(国际版)

  1. 访问 Lark Developer
  2. 创建应用并获取凭证
  3. 配置方式与飞书相同,只需设置 endpoint 为 Lark 端点

相关链接