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

koishi-plugin-chain

v1.0.2

Published

一个功能完整的 Koishi 接龙插件,支持创建、参与、管理接龙活动

Readme

koishi-plugin-chain

一个功能完整的 Koishi 接龙插件,支持创建、参与、管理接龙活动。

功能特性

  • 🎯 创建接龙 - 支持创建自定义名称的接龙活动
  • 👥 参与接龙 - 用户可以提交自己的信息参与接龙
  • 🚪 退出接龙 - 支持用户主动退出已参与的接龙
  • 👮 管理功能 - 创建者和管理员可以踢出成员
  • 📋 查看功能 - 支持查看接龙列表和详细信息
  • 🔒 权限控制 - 可配置仅管理员创建接龙
  • 💾 数据持久化 - 使用数据库存储接龙数据

安装

npm install koishi-plugin-chain

配置

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | adminOnlyCreate | boolean | false | 是否仅管理员可创建接龙 |

使用方法

基础指令

创建接龙

创建接龙 <名称>

创建一个新的接龙活动。

示例:

创建接龙 周末聚餐

参与接龙

参与接龙 <编号> <你的信息>
参加接龙 <编号> <你的信息>  # 别名

参与指定编号的接龙,提交你的信息。

示例:

参与接龙 1 张三 - 带两个菜

退出接龙

退出接龙 <编号>

退出指定编号的接龙。

示例:

退出接龙 1

管理指令

踢出成员

踢出接龙 <编号> <用户信息>

踢出指定用户(仅接龙创建者或管理员可用)。

示例:

踢出接龙 1 张三 - 带两个菜

查看指令

接龙列表

接龙列表

查看所有进行中的接龙活动。

查看接龙详情

查看接龙 <名称或编号>

查看指定接龙的详细信息和参与者列表。

示例:

查看接龙 1
查看接龙 周末聚餐

帮助信息

接龙帮助

显示所有可用指令的帮助信息。

使用场景

聚餐接龙

创建接龙 公司年会聚餐
参与接龙 1 张三 - 带红烧肉
参与接龙 1 李四 - 带可乐两瓶
参与接龙 1 王五 - 带水果拼盘

活动报名

创建接龙 周末爬山活动
参与接龙 2 小明 - 13800138000
参与接龙 2 小红 - 13900139000

物品收集

创建接龙 办公用品采购
参与接龙 3 部门A - 需要打印纸10包
参与接龙 3 部门B - 需要签字笔50支

数据结构

RelayRace(接龙)

interface RelayRace {
  id: number          // 接龙编号
  name: string        // 接龙名称
  creatorId: string   // 创建者ID
  creatorName: string // 创建者名称
  participants: Participant[] // 参与者列表
  createdAt: Date     // 创建时间
}

Participant(参与者)

interface Participant {
  userId: string    // 用户ID
  userInfo: string  // 用户提交的信息
  joinedAt: Date    // 参与时间
}

权限说明

  • 普通用户:可以创建接龙(除非配置限制)、参与接龙、退出自己参与的接龙
  • 接龙创建者:拥有普通用户权限 + 可以踢出该接龙的任何成员
  • 管理员:拥有所有权限,可以踢出任何接龙的任何成员,可以创建接龙(不受配置限制)

注意事项

  1. 接龙名称不能重复
  2. 每个用户在同一个接龙中只能参与一次
  3. 踢出成员时需要输入完整的用户信息(与参与时提交的信息完全一致)
  4. 数据库表会在插件启动时自动创建

开发

依赖

  • koishi - Koishi 框架
  • 需要数据库服务(通过 inject: ['database'] 注入)

数据库表

插件会自动创建 relay_races 表来存储接龙数据。

许可证

MIT License

更新日志

v1.0.0

  • 初始版本
  • 支持基础的接龙创建、参与、退出功能
  • 支持管理员踢出成员
  • 支持查看接龙列表和详情
  • 支持权限控制配置