Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

SaltifyDev/milky-node-sdk

Repository files navigation

Important

milky-node-sdk 已被弃用,请使用 milky-tea


Milky Node SDK

这是 Milky 协议的 Node.js SDK,提供 TypeScript 支持。

源码中使用了 Node.js 的 WebSocket API,因此需要 Node 版本高于或等于 22。如果必须在低于 22 的版本中使用,请在启动时加入 --experimental-websocket 这一 Flag。

初始化

import { MilkyClient } from '@saltify/milky-node-sdk';

const client = new MilkyClient('localhost', 3000, '/', 'your-access-token');

调用 API

const response = await client.callApi('get_group_info', {
  group_id: 123456789,
});

监听事件

client.on('message_receive', (event) => {
  console.log('Received event:', event);
});

About

[已弃用,请改用 milky-tea] Milky 协议的 Node.js SDK

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors