mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-18 20:30:08 +08:00
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
|
|
|
|
export class NTQQSystemApi {
|
|
context: InstanceContext;
|
|
core: NapCatCore;
|
|
|
|
constructor (context: InstanceContext, core: NapCatCore) {
|
|
this.context = context;
|
|
this.core = core;
|
|
}
|
|
|
|
async hasOtherRunningQQProcess () {
|
|
return this.core.util.hasOtherRunningQQProcess();
|
|
}
|
|
|
|
async ocrImage (filePath: string) {
|
|
return this.context.session.getNodeMiscService().wantWinScreenOCR(filePath);
|
|
}
|
|
|
|
async translateEnWordToZn (words: string[]) {
|
|
return this.context.session.getRichMediaService().translateEnWordToZn(words);
|
|
}
|
|
|
|
async getOnlineDev () {
|
|
this.context.session.getMsgService().getOnLineDev();
|
|
}
|
|
|
|
async getArkJsonCollection () {
|
|
return await this.core.eventWrapper.callNoListenerEvent('NodeIKernelCollectionService/collectionArkShare', '1717662698058');
|
|
}
|
|
|
|
async bootMiniApp (appFile: string, params: string) {
|
|
await this.context.session.getNodeMiscService().setMiniAppVersion('2.16.4');
|
|
return this.context.session.getNodeMiscService().startNewMiniApp(appFile, params);
|
|
}
|
|
}
|