From 8d9eb5299360ae29cc64a2ef8d3b875a0b2d4782 Mon Sep 17 00:00:00 2001 From: ITOH Date: Sun, 23 May 2021 11:09:38 +0200 Subject: [PATCH] move back? --- src/handlers/misc/READY.ts | 2 +- src/ws/handle_on_message.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/handlers/misc/READY.ts b/src/handlers/misc/READY.ts index 31d9eaa1c..8bee0fbdf 100644 --- a/src/handlers/misc/READY.ts +++ b/src/handlers/misc/READY.ts @@ -7,7 +7,7 @@ import { DiscordenoShard, ws } from "../../ws/ws.ts"; export function handleReady(data: DiscordGatewayPayload, shardId: number) { // Triggered on each shard - // eventHandlers.shardReady?.(shardId); + eventHandlers.shardReady?.(shardId); // The bot has already started, the last shard is resumed, however. if (cache.isReady) return; diff --git a/src/ws/handle_on_message.ts b/src/ws/handle_on_message.ts index 1de6bb245..262816a8d 100644 --- a/src/ws/handle_on_message.ts +++ b/src/ws/handle_on_message.ts @@ -88,8 +88,6 @@ export async function handleOnMessage(message: any, shardId: number) { // Important for RESUME if (messageData.t === "READY") { - eventHandlers.shardReady?.(shardId); - const shard = ws.shards.get(shardId); if (shard) { shard.sessionId = (messageData.d as DiscordReady).session_id;