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-vote-to-ban

v0.0.5

Published

自助群管系统,投票禁言或踢出

Downloads

747

Readme

koishi-plugin-vote-to-ban

npm

通过民主投票的方式,让群成员共同维护群内秩序。支持禁言和踢出操作,可跨群表决。

🚀 功能特性

  • 引用触发:通过引用违规者的消息直接发起投票,自动抓取违规内容。
  • 双向表决:不仅支持赞同票,还支持反对票(否决权)。
  • 灵活处置:支持自定义禁言时长,或直接发起踢出投票。
  • 跨群审判:支持将投票消息转发到专门的“陪审团”群进行表决。
  • 白名单机制:可设置仅允许特定用户发起投票请求。

🛠️ 配置项

| 配置项 | 类型 | 默认值 | 说明 | |-------|------|--------|------| | voteGroup | string | - | 投票表决群:投票消息将发送到此群。若留空,则在原群进行。 | | allowList | string[] | [] | 白名单用户:仅列表中的用户 ID 可以发起投票(为空则所有人均可发起)。 | | threshold | string | '5:2' | 表决阈值:格式为 赞同数:反对数。达到赞同数执行操作,达到反对数则否决。 | | timeout | number | - | 超时时间(分钟):超过此时间未达标则投票自动失效。设置为 0 则永不超时。 |

📖 使用指南

1. 发起投票

本插件采用**“引用消息”**的方式发起投票,以便固定证据。

  1. 选中/右键 违规者的某条消息。
  2. 输入以下指令:
    • vote:发起踢出投票(默认时长为 0 即踢出)。
    • vote 60:发起禁言 60 分钟的投票。

2. 参与表决

投票发起后,机器人会在目标群发送一条包含规则的投票消息。

投票成员需【回复/引用】该投票消息,并发送以下关键词:

  • 表示支持 (+1)+1yyes支持同意
  • 表示反对 (-1)-1nno反对拒绝

3. 结果判定

  • 通过:当支持人数达到 threshold 前项(如 5 人)时,自动执行禁言或踢出。
  • 否决:当反对人数达到 threshold 后项(如 2 人)时,投票立即终止。
  • 超时:在 timeout 时间内未满足上述任一条件,投票失效。

💡 使用场景示例

场景 A:单群自助管理

  • 配置voteGroup 留空,threshold 设为 3:2
  • 操作:群员 A 引用群员 B 的广告消息发送 vote 10
  • 结果:群内只要有 3 个人回复该消息 +1,群员 B 就会被禁言 10 分钟。

场景 B:跨群陪审团(防骚扰)

  • 配置voteGroup 设为管理员群 ID,allowList 设为资深成员。
  • 操作:资深成员在普通群引用违规消息发送 vote
  • 结果:投票信息会以合并转发的形式发送到管理员群,由管理员们在小群里回复投票,决定是否踢出该用户。

⚠️ 注意事项

  1. 权限要求:机器人必须拥有该群的管理员权限,否则无法执行禁言或踢出动作。
  2. 重复投票:同一用户对同一投票只能投一票。如果先投支持后投反对,会修改其投票倾向。
  3. 环境限制:跨群转发功能在 OneBot 协议下体验最佳(支持合并转发节点)。