From f375cc591d934ea6a5ffc2f3a5ffdea00011256a Mon Sep 17 00:00:00 2001 From: idranme <96647698+idranme@users.noreply.github.com> Date: Tue, 28 Apr 2026 01:41:10 +0800 Subject: [PATCH 1/3] fix --- src/ntqqapi/types/group.ts | 62 ++++++++++--------- .../action/go-cqhttp/GetGroupNotice.ts | 5 +- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/ntqqapi/types/group.ts b/src/ntqqapi/types/group.ts index f424112f..0aaf5e9e 100644 --- a/src/ntqqapi/types/group.ts +++ b/src/ntqqapi/types/group.ts @@ -156,41 +156,43 @@ export interface GroupAllInfo { isAllowModifyConfGroupName: number } +interface GroupBulletinFeed { + uin: string + feedId: string + publishTime: string + msg: { + text: string + textFace: string + pics: { + id: string + width: number + height: number + }[] + title: string + } + type: number + fn: number + cn: number + vn: number + settings: { + isShowEditCard: number + remindTs: number + tipWindowType: number + confirmRequired: number + } + pinned: number + readNum: number + is_read: number + is_all_confirm: number +} + export interface GroupBulletinListResult { groupCode: string srvCode: number readOnly: number role: number - inst: unknown[] - feeds: { - uin: string - feedId: string - publishTime: string - msg: { - text: string - textFace: string - pics: { - id: string - width: number - height: number - }[] - title: string - } - type: number - fn: number - cn: number - vn: number - settings: { - isShowEditCard: number - remindTs: number - tipWindowType: number - confirmRequired: number - } - pinned: number - readNum: number - is_read: number - is_all_confirm: number - }[] + inst: GroupBulletinFeed[] + feeds: GroupBulletinFeed[] groupInfo: { groupCode: string classId: number diff --git a/src/onebot11/action/go-cqhttp/GetGroupNotice.ts b/src/onebot11/action/go-cqhttp/GetGroupNotice.ts index 22a3f45c..7996ae41 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupNotice.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupNotice.ts @@ -33,7 +33,7 @@ export class GetGroupNotice extends BaseAction { protected async _handle(payload: Payload) { const data = await this.ctx.ntGroupApi.getGroupBulletinList(payload.group_id.toString()) const result: Notice[] = [] - for (const feed of data.feeds) { + for (const feed of [...data.feeds, ...data.inst]) { result.push({ notice_id: feed.feedId, sender_id: +feed.uin, @@ -55,6 +55,9 @@ export class GetGroupNotice extends BaseAction { } }) } + if (data.inst.length > 0) { + return result.sort((a, b) => b.publish_time - a.publish_time) + } return result } } From c79a360436f2ec902c6fde10487443c2456c01f3 Mon Sep 17 00:00:00 2001 From: idranme <96647698+idranme@users.noreply.github.com> Date: Tue, 28 Apr 2026 01:50:26 +0800 Subject: [PATCH 2/3] feat --- src/onebot11/action/go-cqhttp/GetGroupNotice.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/onebot11/action/go-cqhttp/GetGroupNotice.ts b/src/onebot11/action/go-cqhttp/GetGroupNotice.ts index 7996ae41..ad119cc3 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupNotice.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupNotice.ts @@ -21,6 +21,7 @@ interface Notice { is_show_edit_card: boolean tip_window: boolean confirm_required: boolean + pinned: boolean } } @@ -51,7 +52,8 @@ export class GetGroupNotice extends BaseAction { settings: { is_show_edit_card: !!feed.settings.isShowEditCard, tip_window: !feed.settings.tipWindowType, - confirm_required: !!feed.settings.confirmRequired + confirm_required: !!feed.settings.confirmRequired, + pinned: !!feed.pinned } }) } From 553beefb4b8215ee2fc1a59c658e51afd7745258 Mon Sep 17 00:00:00 2001 From: idranme <96647698+idranme@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:48:03 +0800 Subject: [PATCH 3/3] chore: update version to 7.12.6 --- "doc/\346\233\264\346\226\260\346\227\245\345\277\227.txt" | 7 +++++++ package-dist.json | 2 +- src/version.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git "a/doc/\346\233\264\346\226\260\346\227\245\345\277\227.txt" "b/doc/\346\233\264\346\226\260\346\227\245\345\277\227.txt" index 88b4f950..abb58f62 100644 --- "a/doc/\346\233\264\346\226\260\346\227\245\345\277\227.txt" +++ "b/doc/\346\233\264\346\226\260\346\227\245\345\277\227.txt" @@ -1,3 +1,10 @@ +V7.12.6 +更新时间 2026-04-28 + +* OneBot 修复 _get_group_notice API 获取不到发给新成员的公告 +* OneBot 支持 _get_group_notice API 获取群公告是否置顶 + +================= V7.12.5 更新时间 2026-04-27 diff --git a/package-dist.json b/package-dist.json index 6c1a5168..da7539b1 100644 --- a/package-dist.json +++ b/package-dist.json @@ -1 +1 @@ -{"name":"llonebot-dist","version":"7.12.5","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}} \ No newline at end of file +{"name":"llonebot-dist","version":"7.12.6","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}} \ No newline at end of file diff --git a/src/version.ts b/src/version.ts index 9d5692ef..3fcd77f8 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '7.12.5' +export const version = '7.12.6'