*Revert as we cannot properly detect all edge cases

This commit is contained in:
Derrick Hammer 2023-03-25 09:22:18 -04:00
parent b7e337e966
commit 071fdc2fb0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 3 deletions

View File

@ -148,11 +148,13 @@ export const factory = function <T extends Client = Client>(
return prop;
}
}
return async (...args: any[]): Promise<any> => {
await target.loadLibs(module);
if (desc?.get) {
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);
};