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-echo-cave

v1.26.8

Published

Group echo cave

Readme

📣 koishi-plugin-echo-cave

npm downloads license

🌌 插件简介

koishi-plugin-echo-cave 是一个为 Koishi 机器人框架设计的群聊消息存储与回溯插件。它能够将群聊中的消息(包括普通消息和转发消息)存储到"回声洞"中,并支持随时随机或指定 ID 调取这些消息,为群聊增添更多互动乐趣和记录功能。

✨ 功能特性

  • 📥 消息存储:支持存储普通消息和转发消息到数据库
  • 🔍 消息查询:支持随机获取消息或通过 ID 精确查找
  • 🗑️ 消息管理:支持删除特定 ID 的消息(消息存储者、原始发送者或管理员)
  • 👤 个人追踪:支持查看自己投稿的消息列表
  • 🔍 发言回溯:支持查看自己被他人投稿的消息列表
  • 📊 排行榜功能:支持查看不同时间段内的回声洞排行榜
  • 🎨 模板化展示:消息展示时自带多种风格的外部包裹信息
  • 🔒 管理员保护:可配置管理员消息保护
  • 📏 媒体限制:支持配置媒体文件大小限制
  • 👥 转发消息用户选择:支持从转发消息中选择相关用户进行绑定

📋 命令列表

| 命令 | 说明 | 权限要求 | |----------------------|-------------------------|-----------------| | cave | 随机获取一条回声洞消息 | 所有人 | | cave <id> | 获取特定 ID 的回声洞消息 | 所有人 | | cave.echo [...userIds] | 将引用的消息存入回声洞 | 所有人 | | cave.drop <id> | 删除特定 ID 的回声洞消息 | 消息存储者、原始发送者或管理员 | | cave.listen | 获取自己投稿的回声洞列表 | 所有人 | | cave.trace | 获取自己发言被投稿的回声洞列表 | 所有人 | | cave.purge <...ids> | 批量删除多个 ID 的回声洞消息 | 消息存储者、原始发送者或管理员 | | cave.search <id> | 搜索特定 ID 的回声洞消息 | 所有人 | | cave.bind <id> <...userIds> | 将用户绑定到特定 ID 的回声洞 | 所有人 | | cave.rank [period] | 查看回声洞排行榜,支持多种时间段 | 所有人 |

🚀 使用指南

安装插件

npm install koishi-plugin-echo-cave

或在插件商城中搜索 koishi-plugin-echo-cave 进行安装。

🛠️ 配置选项

| 配置项 | 类型 | 默认值 | 说明 | |------------------------------|---------|---------|-------------------------------| | adminMessageProtection | boolean | false | 开启管理员消息保护,使管理员发布的消息只能由其他管理员删除 | | allowContributorDelete | boolean | true | 允许消息投稿者删除自己投稿的消息 | | allowSenderDelete | boolean | true | 允许原始消息发送者删除自己被投稿的消息 | | deleteMediaWhenDeletingMsg | boolean | true | 删除消息时是否同时删除媒体文件 | | enableSizeLimit | boolean | false | 启用媒体文件大小限制 | | maxImageSize | number | 2048 | 最大图片大小(KB) | | maxVideoSize | number | 512 | 最大视频大小(KB) | | maxFileSize | number | 512 | 最大文件大小(KB) | | maxRecordSize | number | 512 | 最大录音大小(KB) | | useBase64ForMedia | boolean | false | 是否使用 Base64 编码发送媒体文件 | | sendAllAsForwardMsg | boolean | false | 是否将所有消息以转发消息形式发送 | | rankingTopCount | number | 10 | 排行榜显示的用户数量 | | forwardSelectTimeout | number | 20 | 转发消息用户选择超时时间(秒) | | enableForwardUserSelection | boolean | true | 启用转发消息用户选择功能 |

📝 注意事项

  • 插件仅在群聊中可用,私聊模式下无法正常工作
  • 使用 cave.echo 命令前必须先引用一条消息
  • 删除消息权限可通过配置项灵活控制
  • 存储的消息会保留原始发送者信息
  • 支持媒体文件大小限制,可通过配置项调整
  • 自动检测并避免存储重复消息
  • 支持嵌套转发消息的递归处理
  • 转发消息可选择相关用户进行绑定,超时后自动跳过
  • 可通过配置项禁用转发消息用户选择功能或调整超时时间

🤝 贡献指南

欢迎提交 Issue 或 Pull Request 来帮助改进这个插件!

📄 许可证

本项目采用 MIT 许可证 - 详情请查看 LICENSE 文件