mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: getMsg
This commit is contained in:
@@ -5,6 +5,7 @@ export class Native {
|
||||
platform: string;
|
||||
supportedPlatforms = ['win32'];
|
||||
MoeHooExport: any = { exports: {} };
|
||||
recallHookEnabled: boolean = false;
|
||||
constructor(nodePath: string, platform: string = process.platform) {
|
||||
this.platform = platform;
|
||||
if (!this.supportedPlatforms.includes(this.platform)) {
|
||||
@@ -12,4 +13,11 @@ export class Native {
|
||||
}
|
||||
dlopen(this.MoeHooExport, path.join(nodePath, './native/MoeHoo.win32.node'), constants.dlopen.RTLD_LAZY);
|
||||
}
|
||||
isSetReCallEnabled(): boolean {
|
||||
return this.recallHookEnabled;
|
||||
}
|
||||
registerRecallCallback(callback: (hex: string) => any): void {
|
||||
this.recallHookEnabled = true;
|
||||
return this.MoeHooExport.exports.registMsgPush(callback);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user