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-onebot-verifier

v1.2.2

Published

[仅支持 Onebot 平台]支持好友申请/群组邀请/加群请求等的自动审核,可根据等级与正则进行筛选,并有入群验证码、投票表决、被踢清理等功能。

Readme

koishi-plugin-onebot-verifier

npm

[仅支持 Onebot 平台]支持好友申请/群组邀请/加群请求等的自动审核,可根据等级与正则进行筛选,并有入群验证码、投票表决、被踢清理等功能。


✨ 核心特性

  • 🛡️ 多维度自动化:基于 QQ 等级、正则匹配、群员规模(成员数/总容量)自动处理请求。
  • 🧩 高级验证模式
    • 数学验证码 (Captcha):进群后自动触发数学计算挑战,限时未通过自动移出。
    • 民主投票 (Vote):加群申请可转为群内投票,支持设置通过/拒绝的票数阈值。
  • 交互式人工干预:引用通知消息回复 y/n 即可操作,支持设置超时后的默认决策。
  • 🧹 智能清理与反制
    • 被移出群组时,自动清理 analyse 插件的相关统计数据。
    • 被踢反制:自动删除将机器人移出群组的操作者或原始邀请者的好友。
  • 📍 就地审核逻辑:支持“原群投票”模式,无需在管理私聊间跳转,直接在申请发生的群内解决。

⚙️ 配置项详解

1. 基础配置

  • 通知目标 (notifyTarget): 必填。格式为 private:QQ号guild:群号。用于接收各类审核申请通知。
  • 调试模式 (debugMode): 开启后在日志中输出详细的匹配逻辑和操作记录。
  • 被踢自动处理 (kickBan): 开启后,若机器人被移出群组,会自动尝试删除相关管理员/邀请者的好友关系。

2. 机器人被邀请与好友申请

  • 超时处理 (friendTimeout):
    • false: 永久等待人工处理。
    • 正数: X 分钟后自动通过
    • 负数: X 分钟后自动拒绝
  • 验证维度:
    • friendLevel: 申请人的最低 QQ 等级要求。
    • friendRegex: 匹配好友申请或进群邀请的文字信息。
    • minMembers: 机器人受邀进群时,目标群的最低人数门槛。
    • maxCapacity: 目标群的最低群容量(如要求必须是 500 人以上规模的群)。

3. 用户加群请求 (普通验证)

  • 频率限制模式 (frequencyMode): 当用户频繁申请时的策略:
    • delay: 强制转为人工手动审核。
    • ignore: 直接忽略该请求。
    • reject: 自动拒绝。
  • 普通验证规则 (verifyRules): 表格配置,可针对特定群号设置:
    • 关键词正则匹配、最低等级要求、申请频率限制、以及匹配后的预设动作(接受/拒绝)。

4. 高级验证 (特殊模式)

  • 特殊验证模式 (specialRules):
    • 投票模式 (vote): 申请信息发至通知目标(或原群),群员投票决定。
    • 验证码模式 (captcha): 机器人先自动通过申请,用户入群后需完成挑战。
  • 模式细节:
    • voteRatio: 投票通过/拒绝比例(如 3:2 表示 3 人赞成通过,2 人反对则拒绝)。
    • voteInSitu: 是否在发生申请的群内直接发起投票。
    • captchaDiff: 验证码难度(简单:加减法;中等:两位数乘一位数;困难:两位数乘法)。

🎮 指令交互指南

人工审核与投票

当收到插件推送的审核通知时,通过引用(回复)该消息来进行操作:

| 动作 | 指令 | 效果 | | :--- | :--- | :--- | | 通过申请 | y通过 | 同意该请求 | | 拒绝申请 | n拒绝 [理由] | 拒绝请求并(可选)发送拒绝理由 | | 好友备注 | y [备注名] | 通过好友申请并直接设置备注(仅限好友类型) | | 参与投票 | 引用消息回复 yn | 累加赞成或反对票数,达到阈值自动执行 |

验证码挑战

在开启了 captcha 模式的群组中:

  1. 用户进群后,机器人会 @ 该用户并发出题目。
  2. 用户需在 60 秒 内直接回复正确数字。
  3. 超时或错误:机器人将自动将该用户移出群组(需机器人拥有管理员权限)。

🛠️ 进阶功能说明

自动化数据清理

当机器人退出群组或被踢出时,插件会自动触发以下逻辑:

  1. 统计清理:自动执行 analyse.clear -g [群号],确保数据准确。
  2. 好友切断:如果开启了 kickBan,插件会识别操作者 ID,并自动执行 delete_friend,防止被恶意刷群后残留大量垃圾好友。

⚠️ 注意事项

  1. 权限要求:使用“验证码”或“自动踢人”功能,请务必保证机器人在该群拥有管理员或群主权限。
  2. 通知目标notifyTarget 必须符合 platform:id 格式,且机器人必须与该目标存在好友关系或身处该群内。
  3. 优先级:普通验证规则 (verifyRules) 的优先级高于默认的手动审核逻辑。