mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
style: fix
This commit is contained in:
parent
5f1d8fb99d
commit
90bbdbf2fe
@ -16,15 +16,11 @@ export async function solveProblem<T extends (...arg: any[]) => any>(func: T, ..
|
||||
|
||||
export async function solveAsyncProblem<T extends (...args: any[]) => Promise<any>>(func: T, ...args: Parameters<T>): Promise<Awaited<ReturnType<T>> | undefined> {
|
||||
return new Promise<Awaited<ReturnType<T>> | undefined>((resolve) => {
|
||||
try {
|
||||
func(...args).then((result) => {
|
||||
resolve(result);
|
||||
}).catch((e) => {
|
||||
resolve(undefined);
|
||||
});
|
||||
} catch (e) {
|
||||
func(...args).then((result) => {
|
||||
resolve(result);
|
||||
}).catch((e) => {
|
||||
resolve(undefined);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
//下面这个类是用于将uid+msgid合并的类
|
||||
|
@ -331,7 +331,6 @@ export class NTQQGroupApi {
|
||||
arkJson: string
|
||||
}>>(
|
||||
'NodeIKernelGroupService/getGroupRecommendContactArkJson',
|
||||
5000,
|
||||
GroupCode,
|
||||
);
|
||||
return ret.arkJson;
|
||||
|
Loading…
x
Reference in New Issue
Block a user