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

tanebi

v0.4.0

Published

NTQQ Node.js Protocol Implementation

Readme

PC NTQQ 协议的 TypeScript 实现

使用方法

项目仓库的 examples 部分提供了一些 tanebi 的使用实例,以下是一些常见的场景:

登录

参见 login 文件夹。登录方式有扫码登录和快速登录两种,其中快速登录需要已经登录过的账号的 Keystore。

获取联系人

参见 contact/fetch.ts

const friends = await bot.getFriends();
for (const friend of friends) {
    console.log(`Friend ${friend.remark || friend.nickname} (Uin: ${friend.uin})`);
}

const groups = await bot.getGroups();
for (const group of groups) {
    console.log(`Group ${group.name} (Uin: ${group.uin})`);
    if (group.uin === 0) {
        // Substitute with your group's Uin
        const members = await group.getMembers();
        for (const member of members) {
            console.log(`  Member ${member.card || member.nickname}[${member.specialTitle}] (Uin: ${member.uin})`);
        }
    }
}

消息操作

参见 message 文件夹,支持的操作有发送、撤回、回复等。

// 例:发送消息
const group = await bot.getGroup(0); // 替换为你的群号

await group?.sendMsg(async (b) => {
    b.text('Hello, this is a test message.');
    b.image(readFileSync('temp/qrcode.png'));
});

监听事件

调用 Bot.onEvent 并提供事件名称和回调函数。支持的事件参见 core 的 index.tstype TanebiEventEmitter 定义。

bot.onEvent('groupInvitationRequest', (req) => {
    console.log(`Received group invitation from ${req.invitor.nickname} to join ${req.groupUin}`);
});

Special Thanks

tanebi 离不开以下前辈项目及贡献者:

项目名称源自日语「種火」(たねび),意为火种,向所有先前与当下的 QQ 协议实现致敬。无论是否还在活跃维护,这些项目都是点亮了今天的 QQ Bot 开发的当之无愧的“火种”。