Files
NapCatQQ/packages/napcat-onebot/action/group/SendGroupMsg.ts
T
时瑾 e6f6468377
Release NapCat / validate-version (push) Canceled after 0s
Release NapCat / Build-Framework (push) Canceled after 0s
Release NapCat / Build-Shell (push) Canceled after 0s
Release NapCat / Download-QNX64 (push) Canceled after 0s
Release NapCat / release-napcat (push) Canceled after 0s
Revert "fix: 对齐 OneBot schema 与合并转发消息处理行为 (#1694)" (#1701)
This reverts commit deae7fd467.
2026-03-13 15:26:53 +08:00

27 lines
1012 B
TypeScript

import { ContextMode, ReturnDataType, SendMsgBase, SendMsgPayload } from '@/napcat-onebot/action/msg/SendMsg';
import { ActionName, BaseCheckResult } from '@/napcat-onebot/action/router';
import { GroupActionsExamples } from '../example/GroupActionsExamples';
// 未检测参数
class SendGroupMsg extends SendMsgBase {
override actionName = ActionName.SendGroupMsg;
override actionSummary = '发送群消息';
override actionDescription = '发送群消息';
override actionTags = ['群组接口'];
override payloadExample = GroupActionsExamples.SendGroupMsg.payload;
override returnExample = GroupActionsExamples.SendGroupMsg.response;
protected override async check (payload: SendMsgPayload): Promise<BaseCheckResult> {
delete payload.user_id;
payload.message_type = 'group';
return super.check(payload);
}
override async _handle (payload: SendMsgPayload): Promise<ReturnDataType> {
return this.base_handle(payload, ContextMode.Group);
}
}
export default SendGroupMsg;