mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-18 20:30:08 +08:00
fix: close #1334
This commit is contained in:
parent
3c60997b1c
commit
4bab93e545
@ -28,7 +28,10 @@ export class GetGroupEssence extends OneBotAction<Payload, unknown> {
|
||||
}
|
||||
|
||||
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('获取失败');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user