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-livlyisland-query

v1.0.1

Published

Livlyisland价格和黑名单查询插件,支持简繁转换、模糊查询和正则匹配,内置丰富示例数据

Readme

Koishi Plugin: Livlyisland Query

一个功能强大的Koishi插件,用于查询Livlyisland的物品价格和黑名单信息。

功能特性

  • 🔍 智能查询: 支持精确查询、模糊查询和正则表达式匹配
  • 🌏 简繁转换: 自动处理简体和繁体中文转换
  • 💾 数据持久化: 使用数据库存储价格和黑名单信息
  • 👑 管理员功能: 支持管理员添加、删除价格和黑名单数据
  • 高性能: 优化的查询算法,快速响应

安装

npm install koishi-plugin-livlyisland-query

配置

在Koishi配置文件中添加插件配置:

plugins:
  livlyisland-query:
    adminUsers: 
      - "your-admin-user-id"
    enableFuzzySearch: true
    enableRegexSearch: true
    enableTraditionalChinese: true
    maxFuzzyResults: 5

配置选项

| 选项 | 类型 | 默认值 | 说明 | |------|------|--------|------| | adminUsers | string[] | [] | 管理员用户ID列表 | | enableFuzzySearch | boolean | true | 启用模糊搜索 | | enableRegexSearch | boolean | true | 启用正则表达式搜索 | | enableTraditionalChinese | boolean | true | 启用繁体中文支持 | | maxFuzzyResults | number | 5 | 模糊搜索最大结果数 |

快速开始

1. 加载示例数据

首次使用插件时,管理员可以加载示例数据来快速体验功能:

加载示例数据

2. 尝试查询

加载示例数据后,可以尝试以下查询:

# 价格查询示例
查价格 飘荡的人鱼长发    # 精确匹配
查价格 人鱼发           # 模糊匹配
查价格 钻石             # 模糊匹配多个结果
查价格 小龙蛋           # 稀有物品查询

# 黑名单查询示例  
查黑名单 骗子小王        # 精确匹配
查黑名单 scammer        # 模糊匹配
查黑名单 好人           # 不在黑名单的用户

使用方法

用户命令

价格查询

查价格 物品名称

示例:

  • 用户: 查价格 物品1
  • 机器人: 根据我的查询,我可以很负责任的告诉你,物品1的价格为1,000GP~2,000GP

模糊查询示例:

  • 用户: 查价格 人鱼发
  • 机器人: 根据我的查询,如果您要查询的物品是"飘荡的人鱼长发",那么我可以很负责任的告诉你,物品"飘荡的人鱼长发"的价格为8,000GP~9,600GP

黑名单查询

查黑名单 用户名

示例:

  • 用户: 查黑名单 heimingdan
  • 机器人: 根据我的查询,我可以很负责任的告诉你,"heimingdan"在黑名单里,它是一个大坏蛋,因为它是"坑新手的骗子"

未找到示例:

  • 用户: 查黑名单 baimingdan
  • 机器人: 根据我的查询,我可以很负责任的告诉你,"baimingdan"不在黑名单里,我觉得他应该是一个好人~

管理员命令

价格管理

# 添加物品价格
添加价格 物品名称 最低价格 最高价格

# 删除物品价格
删除价格 物品名称

示例:

添加价格 飘荡的人鱼长发 8000 9600
删除价格 飘荡的人鱼长发

黑名单管理

# 添加黑名单用户
添加黑名单 用户名 原因

# 删除黑名单用户
删除黑名单 用户名

示例:

添加黑名单 heimingdan 坑新手的骗子
删除黑名单 heimingdan

示例数据管理

# 加载示例数据(包含30+个物品价格和10个黑名单用户)
加载示例数据

# 清空所有数据
清空所有数据

# 重新加载示例数据(先清空再加载)
重新加载示例数据

示例数据包含:

  • 服装类: 飘荡的人鱼长发、星空魔法师帽、彩虹独角兽角、天使羽翼等
  • 装饰品类: 钻石项链、黄金手镯、水晶戒指、珍珠发夹等
  • 道具类: 魔法药水、隐身斗篷、传送卷轴、复活石等
  • 宠物相关: 小龙蛋、独角兽幼崽、凤凰羽毛等
  • 房屋装饰: 豪华沙发、水晶吊灯、魔法镜子等
  • 稀有物品: 时光沙漏、永恒之花、太阳神杖等
  • 黑名单用户: 包含各种违规行为的示例用户

查询算法

插件使用多层查询算法,按以下顺序进行匹配:

  1. 精确匹配: 直接匹配输入的查询字符串
  2. 简繁转换匹配: 转换简繁体后再次精确匹配
  3. 正则表达式匹配: 支持正则表达式模式匹配
  4. 模糊搜索: 使用编辑距离算法进行相似度匹配

数据库结构

价格表 (livly_prices)

| 字段 | 类型 | 说明 | |------|------|------| | id | unsigned | 主键,自增 | | name | string | 物品名称 | | minPrice | unsigned | 最低价格 | | maxPrice | unsigned | 最高价格 | | createdAt | timestamp | 创建时间 | | updatedAt | timestamp | 更新时间 |

黑名单表 (livly_blacklist)

| 字段 | 类型 | 说明 | |------|------|------| | id | unsigned | 主键,自增 | | username | string | 用户名 | | reason | text | 加入黑名单的原因 | | createdAt | timestamp | 创建时间 | | updatedAt | timestamp | 更新时间 |

开发

构建项目

npm run build

开发模式

npm run dev

许可证

MIT License

更新日志

v1.0.0

  • 初始版本发布
  • 支持价格和黑名单查询
  • 支持简繁转换和模糊搜索
  • 支持管理员功能
  • 数据库持久化存储