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

@shangxueink/koishi-plugin-keyword-dialogue

v1.0.0

Published

[<ruby>**关键词回复**<rp>(</rp><rt>点我查看使用说明</rt><rp>)</rp></ruby>](https://www.npmjs.com/package/@shangxueink/koishi-plugin-keyword-dialogue) 设置关键词回复,json存放便于编辑。适用于多段落图文的内容添加。自用小插件哦,[更强大的功能请使用dialogue](/market?keyword=dialogue)

Downloads

223

Readme

@shangxueink/koishi-plugin-keyword-dialogue

npm

🤖 本插件用于在聊天机器人中设置关键词回复。

你可以定义特定的关键词,当用户输入这些关键词时,机器人会给出预设的回复。

此外,该插件还支持全局关键词和正则表达式匹配,以及图片下载和多段回复功能。

功能特色

  • 📝 关键词回复:设置特定关键词和对应的回复内容。
  • 🌐 全局关键词:设置全局范围内有效的关键词回复。
  • 🛠️ 正则匹配:支持通过正则表达式匹配用户输入。
  • 🖼️ 图片下载:能够下载用户提供的图片链接,并保存到本地。
  • 📝 多段回复:支持多段回复内容,可以按原始格式发送或合并为一条消息。

配置项说明

基础设置

  • TriggerPrefix: 触发添加关键词的指令前缀,默认为“添加”。
  • DeleteKeyword: 触发删除关键词的指令前缀,默认为“删除”。
  • KeywordOfEnd: 退出添加关键词功能的关键词,默认为“结束添加”。
  • GlobalTriggerPrefix: 触发全局添加关键词的指令前缀,默认为“全局添加”。
  • GlobalDeleteKeyword: 触发全局删除关键词的指令前缀,默认为“全局删除”。
  • defaultImageExtension: 输入图片保存的后缀名,默认为“png”。

进阶设置

  • Prompt: 添加关键词时返回的文字提示,默认为“请输入回复内容(输入结束添加以退出):”。
  • MatchPatternForExit: 如何退出添加关键词模式,默认为包含关键词即可退出。
  • AlwayPrompt: 是否总是返回提示,默认为仅返回一次提示。
  • HandleDuplicateKeywords: 如何处理重复添加的关键词,默认为不允许添加重复内容。
  • MultisegmentAdditionRecoveryEffect: 多段添加的回复效果,默认为合为一条消息。

调试设置

  • consoleInfo: 是否开启日志调试模式,默认为关闭。

安装与使用

  1. 将本插件安装到你的 Koishi 项目中。
  2. 设置所需的配置项。
  3. 开启插件即可啦~

使用方法

添加关键词回复

使用命令格式:添加 <关键词> [-x]

  • <关键词>: 要添加的关键词
  • -x: 可选,表示关键词为正则表达式 例如:
添加 你好啊 -x

使用命令格式:添加 <关键词> [-u]

  • <关键词>: 要添加的关键词
  • -u: 可选,表示关键词为自定义的正则表达式 例如:
添加 (?:.*测试.*123.*|.*快123.*测试.*|^123test$)   -u

删除关键词回复

使用命令格式:删除 <关键词>

  • <关键词>: 要删除的关键词(支持删除正则表达式关键词) 例如:
删除 你好啊

注意事项

  • 请确保你的 Koishi 机器人拥有足够的权限来保存图片和读取配置文件。
  • 本插件使用 JSON 文件来存储关键词和回复数据,请注意数据备份。
  • 如果需要使用图片功能,请确保你的环境支持 Node.js 的文件系统操作。