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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mirai-foxes

v1.5.16

Published

一个根据 Mirai-js 代码重写,运行在 Node.js 下的 Typescript QQ 机器人开发框架

Downloads

17

Readme

mirai-foxes

CI Status CodeFactor HitCount

mirai-foxes,一个根据 Mirai-js 代码重写,运行在 Node.js 下的 Typescript QQ 机器人开发框架。

在 Mirai-js 代码的基础上进行了一些修正,总体提高了代码的可读性,并添加了几个新功能(~~还从别的框架抄了点功能过来~~)。

适合那些觉得 mirai-ts 不够顺手又无法忍受 Mirai-js 类型注释不足的 Devs。同样也适合 Mirai-js 用户!

如果你希望体验完整的 demo,看看 foxes-awesome

import { Middleware, Bot, Message, Event } from 'mirai-foxes'
bot.on(
  'FriendMessage',
  Middleware.Middleware({
    filter: ['user', [Middleware.userFilter([0])]],
    parser: [Middleware.parseCmd],
    matcher: [Middleware.cmdMatch('hello')]
  })(async (data: Event.FriendMessage) => {
    await bot.send('friend', {
      qq: data.sender.id,
      message: [new Message.Plain('Hello World!')]
    })
  })
)

开发文档

mirai-foxes 开发文档 -> https://furdevscn.github.io/mirai-foxes

比较

mirai-ts

类型注释和本项目相似(更好?),内部代码优雅程度比本项目好(有时候也可能是本项目比 mirai-ts 好,~~开发者本当会写 Typescript~~),但是本项目的构造参数写得比 mirai-ts 好,支持监听的~~冷门~~事件也比 mirai-ts 稍微多一点点。

node-mirai

泛用性较本项目好(只需变更 listen 就可以完成对群组/用户消息的监听),类型注释较本项目略为不足,接口较本项目复杂。

Mirai-js

本项目较 Mirai-js 多出了完整的类型注释,但本项目的 Middleware 较 Mirai-js 功能更弱(我懒得重写,~~要写暑假作业了~~)(~~加上数据放 data 里的方式太迷惑了~~),仅有部分简单中间件(~~借鉴 Ariadne~~),虽然能满足基本的命令匹配需求,但操作起来可能仍然比较棘手。

Graia-Ariadne / Graia-Avilla

mirai-foxes 论功能上完全不如 Graia。

mirai-foxes 仅模仿了 Graia 的小部分基本功能,这样可以在保持不错可读性的同时,降低学习成本。

我们更推荐在 Python 机器人编程中使用 Graia。

支持这个项目

我是FurDevsCN开发组的一名成员。如果您希望支持这个项目,可以访问我们的页面来获得更多信息(~~总不可能让我去开 Patreon 或者爱发电吧~~)。

如果觉得这个项目还不错的话,就动动小手给个 star 吧!

感谢

hyperextensible Vim-based text editor

本项目使用免费且自由的 Neovim 完成开发。

同时也推荐您使用 JetBrains 开发工具。

或者您也可以看看不错的 Visual Studio Code

Graia Framework 的开发者为此框架的 API 设计提出了重要建议,在此表示感谢。

Nullqwertyuiop 是文档的重要示范对象。由于文档是由多人编辑的,且未经过质量审查,难免包含有对其本人冒犯性的语句。在此对他的包容表示由衷感谢。此外,他还负责了 mirai-foxes 的文档部署,非常感谢。

FurryHome 为此框架的 debug 提供了部分支援。在此表示感谢。