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-sowing-discord

v0.9.16

Published

搬史插件 - 自动转发群消息,支持消息缓存、动态冷却和表情评估

Downloads

5

Readme

koishi-plugin-sowing-discord

Koishi机器人框架的消息转发插件,自动将指定群组的转发消息转发到其他群组,支持消息缓存、动态冷却和表情评估功能。 项目来自:https://github.com/anka-afk/astrbot_sowing_discord#

功能特性

  • 自动转发群组中的转发消息
  • 本地文件缓存系统,避免重复转发
  • 基于时间的动态冷却机制(白天/夜间不同冷却时间)
  • 表情符号评估系统,过滤不需要的消息
  • 可配置的源群和目标群列表

安装

在Koishi项目中安装此插件:

# 在Koishi项目根目录执行
koishi add sowing-discord

或者手动安装:

# 在插件目录安装依赖
cd plugins/sowing-discord
npm install

# 构建插件(需要TypeScript环境)
npx tsc

配置项

| 配置项 | 类型 | 默认值 | 说明 | |-------|------|-------|------| | banshi_interval | number | 3600 | 搬史间隔(秒) | | banshi_cache_seconds | number | 3600 | 缓存有效期(秒) | | banshi_cooldown_day_seconds | number | 600 | 白天冷却时间(秒) | | banshi_cooldown_night_seconds | number | 3600 | 夜间冷却时间(秒) | | banshi_cooldown_day_start | string | "09:00" | 白天开始时间(HH:MM) | | banshi_cooldown_night_start | string | "01:00" | 夜间开始时间(HH:MM) | | banshi_group_list | number[] | [] | 源群列表(必填) | | banshi_target_list | number[] | [] | 目标群列表(为空时自动获取所有群组) | | block_source_messages | boolean | false | 是否拦截源消息 |

使用说明

  1. 在Koishi配置中启用此插件
  2. 设置源群列表(banshi_group_list
  3. 可选:设置目标群列表(banshi_target_list),为空时将转发到所有群组
  4. 根据需要调整冷却时间和缓存设置

消息评估规则

插件会根据以下规则评估消息是否需要转发:

不允许的表情/文本(遇到则不转发):

  • 👎 (以及各种肤色变体)
  • ❌, ❎, ✖️
  • (bad), (BAD), bad), BAD)
  • (NO), (no), no), NO)
  • ?, ?, ¿

注意事项

  1. 插件会在data/sowing-discord-cache目录下存储消息缓存
  2. 由于API限制,某些平台可能无法获取完整的转发消息内容
  3. 动态冷却时间基于系统当前时间计算

开发

# 克隆仓库
cd plugins
git clone <repository-url> sowing-discord

# 安装依赖
cd sowing-discord
npm install

# 构建插件
npx tsc

许可证

AGPL-3.0