From 4533e6356bf1c589199e6f72d012a7e38126c51e Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Wed, 5 May 2021 17:51:23 +0200 Subject: [PATCH] this is not async anymore --- src/handlers/misc/READY.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handlers/misc/READY.ts b/src/handlers/misc/READY.ts index d9f2e2246..8fef56ae0 100644 --- a/src/handlers/misc/READY.ts +++ b/src/handlers/misc/READY.ts @@ -52,7 +52,7 @@ async function checkReady(payload: Ready, shardId: number, now: number) { if (Date.now() - now > 10000) { eventHandlers.shardFailedToLoad?.(shardId, shard.unavailableGuildIds); // Force execute the loaded function to prevent infinite loop - await loaded(shardId); + loaded(shardId); } else { // Not all guilds were loaded but 10 seconds haven't passed so check again setTimeout(async () => { @@ -65,11 +65,11 @@ async function checkReady(payload: Ready, shardId: number, now: number) { } } else { // All guilds were loaded - await loaded(shardId); + loaded(shardId); } } -async function loaded(shardId: number) { +function loaded(shardId: number) { const shard = ws.shards.get(shardId); if (!shard) return; @@ -84,7 +84,7 @@ async function loaded(shardId: number) { "loop", `3. Running setTimeout in CHANNEL_DELTE file.`, ); - await loaded(shardId); + loaded(shardId); }, 2000); } else { cache.isReady = true;