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-nfa-stock-monitor

v1.2.1

Published

Koishi插件:NFA库存监控 - 支持自定义指令和多商品库存查询

Readme

Koishi NFA 库存监控插件

这是一个Koishi机器人插件,用于监控NFA库存信息。

功能特性

  • 🚀 快速获取NFA库存信息
  • 🛠️ 可配置的API参数
  • 📊 实时库存数据展示
  • 💡 简单易用的单次查询
  • 🎨 支持自定义消息模板
  • 🧪 内置消息模板测试功能

安装

从npm安装

npm install koishi-plugin-nfa-stock-monitor

从GitHub Packages安装

npm install @vteam-studio/koishi-plugin-nfa-stock-monitor

从源码安装

  1. 将插件文件夹放入Koishi项目的plugins目录
  2. 安装依赖:
    npm install
  3. 编译TypeScript:
    npm run build

配置

在Koishi配置文件中添加以下配置:

plugins:
  nfa-stock-monitor:
    apiUrl: "https://mcheika.lol/user/api/index/stock"
    cookie: "你的Cookie值"
    itemId: "2"
    messageTemplate: "当前NFA库存: {stock}个"

配置项说明

  • apiUrl: API接口地址(默认:https://mcheika.lol/user/api/index/stock)
  • cookie: 请求所需的Cookie值(可选,有默认值)
  • itemId: 商品ID(默认:2)
  • messageTemplate: 自定义消息模板(默认:The Stock of NFA : {stock})

使用方法

命令列表

  • /nfa - 获取当前NFA库存信息
  • /nfa-test <模板> - 测试自定义消息模板

使用示例

基本使用

用户: /nfa
机器人: The Stock of NFA : 100

自定义消息模板

用户: /nfa-test "📦 当前NFA库存: {stock}个"
机器人: 测试结果:📦 当前NFA库存: 100个

消息模板示例

  • "当前NFA库存: {stock}个" → 当前NFA库存: 100个
  • "📦 NFA库存状态: {stock}" → 📦 NFA库存状态: 100
  • "The Stock of NFA : {stock}" → The Stock of NFA : 100

开发

构建项目

npm run build

开发模式

npm run dev

注意事项

  1. 请确保Cookie值有效且未过期
  2. 插件会自动处理API请求错误,并在出错时显示错误信息
  3. 每次使用/nfa命令都会实时获取最新的库存信息

许可证

MIT License