From a89768c346be4c05d20f97c6caf0603d5f352b22 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 16 Apr 2021 13:14:01 -0500 Subject: retry on throttle --- src/hypixelApi.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/hypixelApi.ts') diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts index 9840c79..f072d11 100644 --- a/src/hypixelApi.ts +++ b/src/hypixelApi.ts @@ -161,7 +161,9 @@ export async function sendApiRequest({ path, key, args }): Promise setTimeout(resolve, 10000)) + return await sendApiRequest({ path, key, args }) } return fetchJsonParsed } -- cgit