mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-29 21:09:03 +08:00
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { normalize, SendMsgBase } from '@/onebot/action/msg/SendMsg';
|
|
import { OB11PostSendMsg } from '@/onebot/types';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
|
|
// 未验证
|
|
export class GoCQHTTPSendForwardMsgBase extends SendMsgBase {
|
|
protected override async check(payload: OB11PostSendMsg) {
|
|
if (payload.messages) payload.message = normalize(payload.messages);
|
|
return super.check(payload);
|
|
}
|
|
}
|
|
export class GoCQHTTPSendForwardMsg extends GoCQHTTPSendForwardMsgBase {
|
|
override actionName = ActionName.GoCQHTTP_SendForwardMsg;
|
|
|
|
protected override async check(payload: OB11PostSendMsg) {
|
|
if (payload.messages) payload.message = normalize(payload.messages);
|
|
return super.check(payload);
|
|
}
|
|
}
|
|
export class GoCQHTTPSendPrivateForwardMsg extends GoCQHTTPSendForwardMsgBase {
|
|
override actionName = ActionName.GoCQHTTP_SendPrivateForwardMsg;
|
|
}
|
|
|
|
export class GoCQHTTPSendGroupForwardMsg extends GoCQHTTPSendForwardMsgBase {
|
|
override actionName = ActionName.GoCQHTTP_SendGroupForwardMsg;
|
|
}
|