move back?

This commit is contained in:
ITOH
2021-05-23 11:09:38 +02:00
parent d592be5c7b
commit 8d9eb52993
2 changed files with 1 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;