Refactor action examples and enhance metadata

Replaced generic ActionExamples imports with more specific examples modules (FileActionsExamples, GroupActionsExamples, GoCQHTTPActionsExamples) across file, group, and go-cqhttp actions. Added or updated actionSummary, actionDescription, actionTags, payloadExample, and returnExample properties for improved API documentation and clarity.
This commit is contained in:
手瓜一十雪
2026-01-25 18:18:25 +08:00
parent 1df3742748
commit 8623fb1df0
48 changed files with 175 additions and 81 deletions

View File

@@ -2,6 +2,8 @@ import { OB11MessageMixType } from '@/napcat-onebot/types';
import { ContextMode, normalize, ReturnDataType, SendMsgBase, SendMsgPayload } from '@/napcat-onebot/action/msg/SendMsg';
import { ActionName } from '@/napcat-onebot/action/router';
import { GoCQHTTPActionsExamples } from './examples';
// 未验证
type GoCQHTTPSendForwardMsgPayload = SendMsgPayload & { messages?: OB11MessageMixType; };
@@ -13,8 +15,11 @@ export class GoCQHTTPSendForwardMsgBase extends SendMsgBase {
}
export class GoCQHTTPSendForwardMsg extends GoCQHTTPSendForwardMsgBase {
override actionName = ActionName.GoCQHTTP_SendForwardMsg;
override actionSummary = '发送合并转发消息';
override actionDescription = '发送合并转发消息';
override actionTags = ['消息接口'];
override actionTags = ['Go-CQHTTP'];
override payloadExample = GoCQHTTPActionsExamples.SendForwardMsg.payload;
override returnExample = GoCQHTTPActionsExamples.SendForwardMsg.response;
protected override async check (payload: GoCQHTTPSendForwardMsgPayload) {
if (payload.messages) payload.message = normalize(payload.messages);