mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
fix: shardReady should always be emitted when ready event is received
This commit is contained in:
@@ -9,6 +9,9 @@ export function handleReady(
|
||||
data: DiscordGatewayPayload,
|
||||
shardId: number,
|
||||
) {
|
||||
// Triggered on each shard
|
||||
eventHandlers.shardReady?.(shardId);
|
||||
|
||||
// The bot has already started, the last shard is resumed, however.
|
||||
if (cache.isReady) return;
|
||||
|
||||
@@ -19,9 +22,6 @@ export function handleReady(
|
||||
setBotId(payload.user.id);
|
||||
setApplicationId(payload.application.id);
|
||||
|
||||
// Triggered on each shard
|
||||
eventHandlers.shardReady?.(shard);
|
||||
|
||||
// Set ready to false just to go sure
|
||||
shard.ready = false;
|
||||
// All guilds are unavailable at first
|
||||
|
||||
Reference in New Issue
Block a user