*Revert as we cannot properly detect all edge cases
This commit is contained in:
parent
b7e337e966
commit
071fdc2fb0
|
@ -148,11 +148,13 @@ export const factory = function <T extends Client = Client>(
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return async (...args: any[]): Promise<any> => {
|
||||||
|
await target.loadLibs(module);
|
||||||
|
|
||||||
if (desc?.get) {
|
if (desc?.get) {
|
||||||
return target[property as keyof T];
|
return target[property as keyof T];
|
||||||
}
|
}
|
||||||
return async (...args: any[]): Promise<any> => {
|
|
||||||
await target.loadLibs(module);
|
|
||||||
|
|
||||||
return (target[property as keyof T] as Function)(...args);
|
return (target[property as keyof T] as Function)(...args);
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue