From 93c140ed4e34a54f88bf963ded8c521d20c30ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 7 Nov 2025 20:00:17 +0800 Subject: [PATCH] Improve error message for group notice image upload Enhanced the error message when group notice image upload fails to include the error details from the upload API response. --- src/onebot/action/go-cqhttp/SendGroupNotice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onebot/action/go-cqhttp/SendGroupNotice.ts b/src/onebot/action/go-cqhttp/SendGroupNotice.ts index 4ae560fd..d25aabf0 100644 --- a/src/onebot/action/go-cqhttp/SendGroupNotice.ts +++ b/src/onebot/action/go-cqhttp/SendGroupNotice.ts @@ -37,7 +37,7 @@ export class SendGroupNotice extends OneBotAction { await checkFileExist(path, 5000); const ImageUploadResult = await this.core.apis.GroupApi.uploadGroupBulletinPic(payload.group_id.toString(), path); if (ImageUploadResult.errCode !== 0) { - throw new Error(`群公告${payload.image}设置失败,图片上传失败`); + throw new Error(`群公告${payload.image}设置失败,图片上传失败 , 错误信息:${ImageUploadResult.errMsg}`); } unlink(path).catch(() => { });