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-qqmonitor-guard

v0.1.0

Published

Koishi plugin for QQMonitor verification and group moderation.

Readme

koishi-plugin-qqmonitor-guard

Koishi 插件:对接 QQMonitor API,校验群成员是否存在有效绑定并按策略处理(可踢出、可演练)。

功能

  • 入群自动校验(可开关)
  • 定时巡检指定群成员(可开关)
  • 校验失败自动踢群(可开关)
  • 白名单豁免
  • 踢人日志通知到指定群
  • qqm.check <qq> 手动校验命令

安装

在该工作区执行:

npm install
npm run build

把编译产物作为本地插件接入 Koishi(或直接在 Koishi 项目里以源码方式引用)。

Koishi 控制台配置分组

插件配置页分为 3 组:

  1. QQMonitor API 配置
    • apiUrl
    • token
    • secret(密码样式显示)
  2. 请求与重试
    • timeoutMs
    • retries
    • retryDelayMs
  3. 校验与处置策略
    • kickOnFail
    • dryRun
    • rejectAddRequest
    • enableJoinCheck
    • enableScheduledCheck
    • scheduleIntervalMinutes
    • monitoredGroups
    • whitelistQQ
    • notifyGroupId

Koishi 配置示例

import {} from "koishi-plugin-qqmonitor-guard";

export default {
  plugins: {
    "qqmonitor-guard": {
      apiUrl: "https://your-aa-site/qqmonitor/api/v1/verify-qq/",
      token: "your-public-token",
      secret: "your-very-strong-secret",
      timeoutMs: 8000,
      retries: 1,
      retryDelayMs: 800,
      kickOnFail: true,
      dryRun: false,
      rejectAddRequest: false,
      enableJoinCheck: true,
      enableScheduledCheck: false,
      scheduleIntervalMinutes: 60,
      monitoredGroups: ["123456789"],
      whitelistQQ: ["10000"],
      notifyGroupId: "123456789",
    },
  },
};

QQMonitor API 对接约定

插件按以下头部发起请求:

  • X-QQM-TOKEN
  • X-QQM-TIMESTAMP
  • X-QQM-SIGNATURE = hmac_sha256(secret, "${token}.${timestamp}.${qq_number}")

请求体:

{
  "qq_number": "123456789"
}

行为说明

  • 当返回 ok=false 或 exists=false 或 in_alliance=false 时,判定为失败。
  • 失败后如 kickOnFail=true,则执行踢人;如 dryRun=true,只记录日志不踢人。
  • 踢人能力依赖适配器暴露的 OneBot setGroupKick / set_group_kick 接口。

兼容性说明

  • 已实现逻辑优先兼容 OneBot 风格 QQ 适配器。
  • 若你使用的是其他适配器,请按 src/index.ts 中 kickMember 与 listGroupMembers 适配对应 API。