feat(wip): 新的客户端协议库

This commit is contained in:
CrescentLeaf
2025-11-08 16:17:58 +08:00
parent 230cc08182
commit 6ee209f9f6
17 changed files with 502 additions and 0 deletions

15
client-protocol/test.ts Normal file
View File

@@ -0,0 +1,15 @@
import LingChairClient, { User, UserMySelf } from "./LingChairClient.ts"
import OnMessageData from "./type/OnMessageData.ts"
const client = new LingChairClient({
server_url: 'ws://localhost:3601',
device_id: 'test01'
})
await client.auth({
account: '满月',
password: '满月',
})
client.on('Client.onMessage', (data: OnMessageData) => {
console.log(data)
})
console.log(await (await UserMySelf.getMySelf(client))?.getMyRecentChatBeans())