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 🙏

© 2025 – Pkg Stats / Ryan Hefner

koishi-plugin-spell-wrong

v0.2.0

Published

[<ruby>你拼错了指令<rp>(</rp><rt>点我查看README</rt><rp>)</rp></ruby>](https://www.npmjs.com/package/koishi-plugin-spell-wrong)。支持在用户输入没有被处理的情况下,进行提示返回处理。 [点我预览效果图](https://i0.hdslb.com/bfs/openplatform/efff3a76e737a7c986f670b4c64ad878ec527927.png)

Readme

koishi-plugin-spell-wrong

npm

当用户拼错指令时,给予友好提示。当用户输入不是有效指令时,插件会自动返回一个友好的提示,帮助用户正确使用机器人功能。

功能特点

  • 自动检测用户输入是否为有效指令
  • 支持自定义提示消息和行为
  • 可配置是否仅在@机器人时触发
  • 灵活控制中间件优先级,可选择是否让其他功能(如AI对话)优先处理

效果预览

安装

npm install koishi-plugin-spell-wrong

或者在 Koishi 控制台中搜索并安装 spell-wrong

配置项

基本设置

  • onlyHasAt: 是否仅在@机器人时触发检测(默认:false
  • returnNext: 使用临时中间件确保只处理未被其他功能捕获的消息(默认:true
    • 开启后,其他功能(如AI对话)会优先处理用户消息
    • 关闭后,本插件会立即处理不符合指令格式的消息

提示行为

  • tipAction: 自定义提示行为的代码
    • 可使用 sessionhctxloggerconfig 变量
    • 默认会提示用户输入 help 查看可用指令

使用示例

默认配置

插件安装后,当用户输入不符合指令格式的消息时,会自动提示:

您输入的不是有效指令,请输入 help 查看可用指令。

自定义提示行为

您可以在配置中自定义 tipAction 来实现更复杂的提示行为,例如:

// 提供更详细的帮助信息
await session.send(h.quote(session.messageId) + '您输入的不是有效指令。\n可用指令前缀:/ 或 .\n常用指令:help, ping, echo\n输入 /help 查看完整指令列表。');

注意事项

  • returnNext 设为 true 时,如果有其他插件(如AI对话)已经处理了用户消息,本插件的提示将不会触发
  • onlyHasAt 设为 true 时,只有@机器人的消息才会被检测

许可证

MIT