Skip to content

Commit 1cadea3

Browse files
committed
Merge branch 'dev'
2 parents 9a6c4e9 + 06b05ff commit 1cadea3

8 files changed

Lines changed: 406 additions & 822 deletions

File tree

doc/更新日志.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
V8.1.10
2+
更新时间 2026-09-04
3+
4+
* 修复机器人自身发出的私聊文件被对方下载后错误上报事件
5+
* 修复 OneBot 上报骰子消息时缺少骰面点数
6+
7+
=================
18
V8.1.9
29
更新时间 2026-08-20
310

package-dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"llonebot-dist","version":"8.1.9","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}
1+
{"name":"llonebot-dist","version":"8.1.10","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@
2323
"@cordisjs/plugin-database": "^4.1.1",
2424
"@cordisjs/plugin-database-sqlite": "^5.1.1",
2525
"@cordisjs/plugin-logger-console": "^1.0.0",
26-
"@cordisjs/plugin-timer": "^1.1.2",
26+
"@cordisjs/plugin-timer": "^1.1.3",
2727
"@hono/node-server": "^2.1.1",
2828
"@saltify/typeproto": "^0.4.1",
2929
"@satorijs/element": "^3.2.0",
3030
"@satorijs/protocol": "^1.7.0",
3131
"compare-versions": "^6.1.1",
32-
"cordis": "4.0.0-rc.8",
32+
"cordis": "4.0.0-rc.9",
3333
"cosmokit": "^1.8.1",
34-
"fast-xml-parser": "^5.10.1",
35-
"file-type": "^22.0.1",
34+
"fast-xml-parser": "^5.11.1",
35+
"file-type": "^22.0.2",
3636
"fluent-ffmpeg": "^2.1.3",
3737
"get-port": "^7.2.0",
38-
"hono": "^4.13.2",
38+
"hono": "^4.13.5",
3939
"image-size": "^2.0.2",
4040
"json5": "^2.2.3",
41-
"nodemailer": "^9.0.5",
41+
"nodemailer": "^9.1.1",
4242
"qrcode": "^1.5.4",
4343
"schemastery": "^3.18.0",
4444
"sift": "^17.1.3",
4545
"silk-wasm": "^3.7.1",
4646
"ws": "^8.21.3",
47-
"zod": "^4.4.3"
47+
"zod": "^4.5.4"
4848
},
4949
"devDependencies": {
5050
"@types/fluent-ffmpeg": "^2.1.28",
@@ -54,11 +54,11 @@
5454
"@types/ws": "^8.18.1",
5555
"milkygen": "^0.3.3",
5656
"ts-case-convert": "^2.3.1",
57-
"tsx": "^4.23.12",
57+
"tsx": "^4.23.13",
5858
"typescript": "^7.0.2",
59-
"vite": "^8.2.1",
60-
"vite-plugin-cp": "^6.0.3",
61-
"vitest": "^4.1.10"
59+
"vite": "^8.2.2",
60+
"vite-plugin-cp": "^8.0.1",
61+
"vitest": "^4.1.11"
6262
},
6363
"packageManager": "yarn@4.18.0"
6464
}

src/ntqqapi/dispatcher.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -846,23 +846,25 @@ export function convertToRawMessage(msg: InferProtoModel<typeof Msg.Message>, ra
846846
// C2C 离线文件(trans 0x211 + msgType=PrivateFile):内容在 body.msgContent 而不是 richText.elems
847847
if (msgType === MsgType.PrivateFile && body?.msgContent && elements.length === 0) {
848848
try {
849-
const fe = Msg.FileExtra.decode(Buffer.from(body.msgContent))
849+
const fe = Msg.FileExtra.decode(body.msgContent)
850850
const nof = fe.file
851-
if (nof) {
852-
elements.push({
853-
elementType: ElementType.File,
854-
fileElement: {
855-
fileName: nof.fileName,
856-
fileSize: nof.fileSize,
857-
fileMd5: nof.fileMd5 ? Buffer.from(nof.fileMd5).toString('hex') : '',
858-
expireTime: nof.expireTime,
859-
fileUuid: nof.fileUuid,
860-
fileBizId: 0,
861-
filePath: '',
862-
folderId: ''
863-
},
864-
})
851+
// 当 bot 自身发出的文件被对方下载后,会触发 fileType=1
852+
if (nof.fileType !== 0) {
853+
return null
865854
}
855+
elements.push({
856+
elementType: ElementType.File,
857+
fileElement: {
858+
fileName: nof.fileName,
859+
fileSize: nof.fileSize,
860+
fileMd5: nof.fileMd5 ? nof.fileMd5.toString('hex') : '',
861+
expireTime: nof.expireTime,
862+
fileUuid: nof.fileUuid,
863+
fileBizId: 0,
864+
filePath: '',
865+
folderId: ''
866+
}
867+
})
866868
} catch (e) {
867869
logger.warn('PrivateFile FileExtra decode failed:', (e as Error).message)
868870
}

src/ntqqapi/helper/messageParsing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export function parseElements(
308308
packId: ext.aniStickerPackId,
309309
stickerId: ext.aniStickerId,
310310
stickerType: ext.aniStickerType,
311-
resultId: ext.resultId !== undefined ? String(ext.resultId) : undefined,
311+
resultId: ext.resultId,
312312
},
313313
})
314314
break

src/ntqqapi/proto/msg.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,9 @@ export namespace Msg {
385385
faceId: ProtoField(3, 'int32', 'optional'),
386386
field4: ProtoField(4, 'int32', 'optional'),
387387
aniStickerType: ProtoField(5, 'int32', 'optional'),
388-
field6: ProtoField(6, 'string', 'optional'),
388+
resultId: ProtoField(6, 'string', 'optional'),
389389
preview: ProtoField(7, 'string', 'optional'),
390390
field9: ProtoField(9, 'int32', 'optional'),
391-
/** dice/rps 才有:1-6 / 1-3 表示骰子点数或猜拳手势 */
392-
resultId: ProtoField(11, 'int32', 'optional'),
393391
})
394392

395393
export const GroupFileExtra = ProtoMessage.of({

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '8.1.9'
1+
export const version = '8.1.10'

0 commit comments

Comments
 (0)