From 61cbcdffe8ee1f08919c84d2a6938b3371341cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 14 Oct 2024 21:56:51 +0800 Subject: [PATCH] fix #431 --- src/onebot/action/msg/SendMsg.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/onebot/action/msg/SendMsg.ts b/src/onebot/action/msg/SendMsg.ts index d65d2032..34036653 100644 --- a/src/onebot/action/msg/SendMsg.ts +++ b/src/onebot/action/msg/SendMsg.ts @@ -69,7 +69,7 @@ export async function createContext(core: NapCatCore, payload: OB11PostContext, } return { chatType: ChatType.KCHATTYPEC2C, - peerUid: Uid!, + peerUid: Uid, guildId: '', }; } @@ -100,6 +100,7 @@ export class SendMsg extends BaseAction { } async _handle(payload: OB11PostSendMsg): Promise<{ message_id: number }> { + this.contextMode = ContextMode.Normal; if (payload.message_type === 'group') this.contextMode = ContextMode.Group; if (payload.message_type === 'private') this.contextMode = ContextMode.Private; const peer = await createContext(this.core, payload, this.contextMode);