Files
NapCatQQ/packages/napcat-onebot/action/msg/SendPrivateMsg.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

30 lines
902 B
TypeScript

import { ContextMode, ReturnDataType, SendMsgBase, SendMsgPayload } from './SendMsg';
import { ActionName, BaseCheckResult } from '@/napcat-onebot/action/router';
// 未检测参数
class SendPrivateMsg extends SendMsgBase {
override actionName = ActionName.SendPrivateMsg;
override actionSummary = '发送私聊消息';
override actionDescription = '发送私聊消息';
override actionTags = ['消息接口'];
override payloadExample = {
user_id: '123456789',
message: 'hello',
};
override returnExample = {
message_id: 123456,
};
protected override async check (payload: SendMsgPayload): Promise<BaseCheckResult> {
payload.message_type = 'private';
return super.check(payload);
}
override async _handle (payload: SendMsgPayload): Promise<ReturnDataType> {
return this.base_handle(payload, ContextMode.Private);
}
}
export default SendPrivateMsg;