refactor: rename all coreContext -> core

This commit is contained in:
Wesley F. Young committed 2024-08-26 09:19:50 +08:00
1 parent a5f9e44ebb
commit 04fb771f42
79 files changed
+386 -389

No files matched your search

+3 -3
View File
@@ -15,11 +15,11 @@ type Payload = FromSchema<typeof SchemaData>;
export class OCRImage extends BaseAction<Payload, any> {
actionName = ActionName.OCRImage;
PayloadSchema = SchemaData;
payloadSchema = SchemaData;
async _handle(payload: Payload) {
const NTQQSystemApi = this.CoreContext.apis.SystemApi;
const { path, isLocal, errMsg, success } = (await uri2local(this.CoreContext.NapCatTempPath, payload.image));
const NTQQSystemApi = this.core.apis.SystemApi;
const { path, isLocal, errMsg, success } = (await uri2local(this.core.NapCatTempPath, payload.image));
if (!success) {
throw `OCR ${payload.image}失败,image字段可能格式不正确`;
}