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-multi-bot-controller-groupwelcome-message

v1.0.0

Published

Multi-bot group welcome/leave message controller - manages group welcome and leave messages for multiple bots with per-group configuration support

Readme

koishi-plugin-multi-bot-controller-groupwelcome-message

群组欢迎/退群消息插件 - 配合 multi-bot-controller 为多个 Bot 管理群组欢迎和退群消息。

功能特性

  • 🤖 多 Bot 支持:配合 multi-bot-controller 为不同 Bot 配置独立的欢迎/退群消息
  • ⏱️ 延迟合并发送:短时间内的多条入群/退群事件可合并为一条消息,避免刷屏
  • 💬 丰富的消息变量:支持用户昵称、头像、群信息、时间、一言等多种变量
  • 📊 Table 表格配置:可视化配置界面,按群组管理消息

安装

```bash npm install koishi-plugin-multi-bot-controller-groupwelcome-message ```

配置示例

在插件配置界面中:

  1. 选择要使用的 Bot(从 multi-bot-controller 已配置的 Bot 中选择)
  2. 选择延迟模式
    • 滑动窗口:每个新事件重置定时器,最大化合并效果(默认)
    • 固定窗口:第一个事件触发后不再重置,延迟时间可预测
  3. 为每个 Bot 配置入群欢迎消息和退群消息:

入群欢迎消息配置

| 群组/频道 ID | 入群欢迎消息 | 延迟发送时间(秒) | |-------------|-------------|------------------| | 123456789 | 欢迎 {user} 加入群组!当前人数 {group_count} | 5 | | 987654321 | 欢迎 {user}、{avatar} | 0 |

退群提醒消息配置

| 群组/频道 ID | 退群提醒消息 | 延迟发送时间(秒) | |-------------|-------------|------------------| | 123456789 | {user} 离开了群组 | 3 |

消息变量

| 变量 | 说明 | 示例 | |------|------|------| | {user} | 用户昵称(退群消息中若同时存在{id}则此项被忽略) | 张三 | | {id} | 用户 ID | 123456789 | | {at} | @该用户 | @123456789 | | {avatar} | 用户头像 | avatar | | {group} | 群组名称 | 测试群 | | {group_id} | 群组 ID | 123456789 | | {group_count} | 群组人数 | 100 | | {time} | 当前时间 | 2026/02/14 20:00:00 | | {hitokoto} | 一言 | 这一生,我仅为我自己而活。 |

注意:由于 OneBot 协议限制,退群事件不包含用户昵称信息。因此退群消息建议使用 {id} 而非 {user}。若消息中同时包含 {user}{id},插件会自动忽略 {user} 变量。

延迟合并发送

设置 延迟发送时间 大于 0 时,会启用延迟合并功能:

  • 0 秒:立即发送消息(默认)
  • 大于 0:等待指定秒数后,将该时间段内的多条入群/退群事件合并为一条消息发送

延迟模式

每个 Bot 可以选择不同的延迟模式:

| 模式 | 行为 | 适用场景 | |------|------|----------| | 滑动窗口 | 每个新事件重置定时器 | 希望最大化合并效果,允许延迟较长 | | 固定窗口 | 第一个事件触发后不再重置 | 希望延迟时间可预测 |

示例对比(延迟时间 5 秒):

| 时间 | 滑动窗口 | 固定窗口 | |------|----------|----------| | 0s | 用户A 加入,等待到 5s | 用户A 加入,等待到 5s | | 2s | 用户B 加入,重置等待到 7s | 用户B 加入,仍等待到 5s | | 4s | 用户C 加入,重置等待到 9s | 用户C 加入,仍等待到 5s | | 发送时间 | 9s(3 个用户) | 5s(3 个用户) |

合并时变量处理规则:

  • {user}、{id}:用顿号(、)分隔全部列出
  • {at}:为每个用户生成 @ 元素
  • {avatar}:每个用户头像换行显示
  • {group_count}:取最新群人数
  • {time}:取最后事件的时间
  • {hitokoto}:只获取一次

依赖项

License

MIT