fix: coerce
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s

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

No files matched your search

+4 -5
View File
@@ -1,15 +1,14 @@
import { ContextMode, SendMsgBase } from './SendMsg';
import { ActionName, BaseCheckResult } from '@/onebot/action/router';
import { ActionName } from '@/onebot/action/router';
import { OB11PostSendMsg } from '@/onebot/types';
// 未检测参数
class SendPrivateMsg extends SendMsgBase {
override actionName = ActionName.SendPrivateMsg;
override contextMode: ContextMode = ContextMode.Private;
protected override async check(payload: OB11PostSendMsg): Promise<BaseCheckResult> {
payload.message_type = 'private';
return super.check(payload);
override async _handle(payload: OB11PostSendMsg) {
if (payload.messages) payload.message = payload.messages;
return super._handle(payload);
}
}