mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
change: pass shardId instead of the shard in shard events
This commit is contained in:
@@ -48,7 +48,7 @@ function checkReady(payload: Ready, shard: DiscordenoShard) {
|
||||
|
||||
// If the last GUILD_CREATE has been received before 5 seconds if so most likely the remaining guilds are unavailable
|
||||
if (shard.lastAvailable + 5000 < Date.now()) {
|
||||
eventHandlers.shardFailedToLoad?.(shard, shard.unavailableGuildIds);
|
||||
eventHandlers.shardFailedToLoad?.(shard.id, shard.unavailableGuildIds);
|
||||
// Force execute the loaded function to prevent infinite loop
|
||||
return loaded(shard);
|
||||
}
|
||||
|
||||
@@ -208,10 +208,10 @@ export interface EventHandlers {
|
||||
member: DiscordenoMember,
|
||||
roleId: bigint,
|
||||
) => unknown;
|
||||
shardReady?: (shard: DiscordenoShard) => unknown;
|
||||
shardReady?: (shardId: number) => unknown;
|
||||
/** Sent when a shard failed to load. */
|
||||
shardFailedToLoad?: (
|
||||
shard: DiscordenoShard,
|
||||
shardId: number,
|
||||
unavailableGuildIds: Set<bigint>,
|
||||
) => unknown;
|
||||
/** Sent when a thread is created */
|
||||
|
||||
Reference in New Issue
Block a user