From 4bab93e545521c72b2d33fa41406ea2abb9eee11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E7=91=BE?= <74231782+sj817@users.noreply.github.com> Date: Sat, 1 Nov 2025 14:07:41 +0800 Subject: [PATCH] fix: close #1334 --- src/onebot/action/group/GetGroupEssence.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/onebot/action/group/GetGroupEssence.ts b/src/onebot/action/group/GetGroupEssence.ts index 91deb65c..8859599e 100644 --- a/src/onebot/action/group/GetGroupEssence.ts +++ b/src/onebot/action/group/GetGroupEssence.ts @@ -28,7 +28,10 @@ export class GetGroupEssence extends OneBotAction { } async _handle(payload: Payload, _adapter: string, config: NetworkAdapterConfig) { - const msglist = (await this.core.apis.WebApi.getGroupEssenceMsgAll(payload.group_id.toString())).flatMap((e) => e.data.msg_list); + const msglist = (await this.core.apis.WebApi.getGroupEssenceMsgAll(payload.group_id.toString())) + .flatMap((e) => e?.data?.msg_list) + // 在群精华回空的时候会出现[null]的情况~ https://github.com/NapNeko/NapCatQQ/issues/1334 + .filter(Boolean); if (!msglist) { throw new Error('获取失败'); }