diff --git a/src/service/V11/index.ts b/src/service/V11/index.ts index 4733d93..e026727 100644 --- a/src/service/V11/index.ts +++ b/src/service/V11/index.ts @@ -421,7 +421,7 @@ export class V11 extends Service<"V11"> implements OneBot.Base { try { data = JSON.parse(msgStr) as V11.Protocol; let ret: string; - if (data.action.startsWith(".handle_quick_operation")) { + if (data.action?.startsWith(".handle_quick_operation")) { const event = data.params.context, res = data.params.operation; this._quickOperate(event, res); diff --git a/src/service/V12/index.ts b/src/service/V12/index.ts index 11587f1..423b3e8 100644 --- a/src/service/V12/index.ts +++ b/src/service/V12/index.ts @@ -691,7 +691,7 @@ export class V12 extends Service<"V12"> implements OneBot.Base { try { data = JSON.parse(String(msg)) as V12.Protocol; let ret: string; - if (data.action.startsWith(".handle_quick_operation")) { + if (data.action?.startsWith(".handle_quick_operation")) { const event = data.params.context, res = data.params.operation; this._quickOperate(event, res);