diff --git a/src/onebot11/action/group/GetGroupNotice.ts b/src/onebot11/action/group/GetGroupNotice.ts index ecb572ea..803c6f50 100644 --- a/src/onebot11/action/group/GetGroupNotice.ts +++ b/src/onebot11/action/group/GetGroupNotice.ts @@ -17,7 +17,8 @@ interface GroupNotice { }> } } -export class GetGroupNotice extends BaseAction { +type ApiGroupNotice = GroupNotice & WebApiGroupNoticeFeed; +export class GetGroupNotice extends BaseAction { actionName = ActionName.GoCQHTTP_GetGroupNotice; protected async _handle(payload: PayloadType) { @@ -26,9 +27,10 @@ export class GetGroupNotice extends BaseAction { if (!ret) { throw new Error('获取公告失败'); } - let retNotices: GroupNotice[] = new Array(); + let retNotices: ApiGroupNotice[] = new Array(); for (let key in ret.feeds) { - let retNotice: GroupNotice = { + let retNotice: ApiGroupNotice = { + ...ret.feeds[key], sender_id: ret.feeds[key].u, publish_time: ret.feeds[key].pubt, message: {