mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 17:30:07 +00:00
move back?
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user