fix: coerce

This commit is contained in:
手瓜一十雪
2025-04-17 22:17:35 +08:00
parent 9df7c341a9
commit fb20b2e16c
7 changed files with 40 additions and 35 deletions

View File

@@ -1,16 +1,15 @@
import { ContextMode, SendMsgBase } from '@/onebot/action/msg/SendMsg';
import { ActionName, BaseCheckResult } from '@/onebot/action/router';
import { ActionName } from '@/onebot/action/router';
import { OB11PostSendMsg } from '@/onebot/types';
// 未检测参数
class SendGroupMsg extends SendMsgBase {
override actionName = ActionName.SendGroupMsg;
override contextMode: ContextMode = ContextMode.Group;
protected override async check(payload: OB11PostSendMsg): Promise<BaseCheckResult> {
override async _handle(payload: OB11PostSendMsg) {
delete payload.user_id;
payload.message_type = 'group';
return super.check(payload);
return super._handle(payload);
}
}