NapCatQQ source snapshot
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
Release Tag / validate-version (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:01:47 +08:00
commit f954252a34
1111 files changed
+139867

No files matched your search

@@ -0,0 +1,33 @@
import { OneBotAction } from '@/napcat-onebot/action/OneBotAction';
import { ActionName } from '@/napcat-onebot/action/router';
import { Static, Type } from '@sinclair/typebox';
import { GroupActionsExamples } from '../example/GroupActionsExamples';
const PayloadSchema = Type.Object({
group_id: Type.String({ description: '群号' }),
notice_id: Type.String({ description: '公告ID' }),
});
type PayloadType = Static<typeof PayloadSchema>;
const ReturnSchema = Type.Any({ description: '操作结果' });
type ReturnType = Static<typeof ReturnSchema>;
export class DelGroupNotice extends OneBotAction<PayloadType, ReturnType> {
override actionName = ActionName.DelGroupNotice;
override payloadSchema = PayloadSchema;
override returnSchema = ReturnSchema;
override actionSummary = '删除群公告';
override actionDescription = '删除群聊中的公告';
override actionTags = ['群组接口'];
override payloadExample = GroupActionsExamples.DelGroupNotice.payload;
override returnExample = GroupActionsExamples.DelGroupNotice.response;
async _handle (payload: PayloadType) {
const group = payload.group_id.toString();
const noticeId = payload.notice_id;
return await this.core.apis.GroupApi.deleteGroupBulletin(group, noticeId);
}
}