Skip to content

Commit 12797bc

Browse files
committed
chore: v6.5.6 support 41679, 41785
1 parent 8003b85 commit 12797bc

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

doc/更新日志.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
V6.5.6
2+
更新时间 2025-11-04
3+
4+
* 支持 41679,41785
5+
=================
6+
17
V6.5.5
28
更新时间 2025-10-31
39

package-dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"llonebot","version":"6.5.5","type":"module","description":"","main":"llonebot.js","author":"linyuchen"}
1+
{"name":"llonebot","version":"6.5.6","type":"module","description":"","main":"llonebot.js","author":"linyuchen"}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'fs'
22
import packageJson from '../package-dist.json'
33

4-
export const version = '6.5.5'
4+
export const version = '6.5.6'
55

66
export const writeVersion = ()=>{
77
const pkgJsonPath = './package-dist.json'

test/ws/reverse.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import asyncio
2+
import json
3+
import uuid
4+
5+
import websockets
6+
7+
async def async_input(prompt: str = "") -> str:
8+
loop = asyncio.get_event_loop()
9+
return await loop.run_in_executor(None, input, prompt)
10+
11+
websocket_clients = []
12+
13+
# 处理客户端连接
14+
async def handle_connection(websocket):
15+
print("LLOneBot 已连接")
16+
websocket_clients.append(websocket)
17+
try:
18+
async for message in websocket:
19+
print(f"收到消息: {message}")
20+
except websockets.ConnectionClosed:
21+
try:
22+
websocket_clients.remove(websocket)
23+
except ValueError:
24+
pass
25+
print("客户端断开连接")
26+
27+
28+
# 启动 WebSocket 服务器
29+
async def start_server():
30+
async with websockets.serve(handle_connection, "localhost", 8765):
31+
print("WebSocket 服务器已启动,监听 ws://localhost:8765")
32+
await asyncio.Future()
33+
34+
async def main():
35+
group_id = await async_input("输入群号: ")
36+
asyncio.create_task(start_server())
37+
while True:
38+
message = await async_input("输入消息内容: ")
39+
echo = str(uuid.uuid4())
40+
data = {
41+
"action": "send_group_msg",
42+
"params": {
43+
"group_id": group_id,
44+
"message": {
45+
"type": "text",
46+
"data": {
47+
"text": message
48+
}
49+
}
50+
},
51+
'echo': echo
52+
}
53+
for ws in websocket_clients:
54+
await ws.send(json.dumps(data))
55+
56+
57+
asyncio.run(main())

0 commit comments

Comments
 (0)