mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-09 13:03:37 +08:00
20 lines
659 B
TypeScript
20 lines
659 B
TypeScript
import { ContextMode, ReturnDataType, SendMsgBase } from './SendMsg';
|
|
import { ActionName, BaseCheckResult } from '@/napcat-onebot/action/router';
|
|
import { OB11PostSendMsg } from '@/napcat-onebot/types';
|
|
|
|
// 未检测参数
|
|
class SendPrivateMsg extends SendMsgBase {
|
|
override actionName = ActionName.SendPrivateMsg;
|
|
|
|
protected override async check (payload: OB11PostSendMsg): Promise<BaseCheckResult> {
|
|
payload.message_type = 'private';
|
|
return super.check(payload);
|
|
}
|
|
|
|
override async _handle (payload: OB11PostSendMsg): Promise<ReturnDataType> {
|
|
return this.base_handle(payload, ContextMode.Private);
|
|
}
|
|
}
|
|
|
|
export default SendPrivateMsg;
|