mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
more things
This commit is contained in:
@@ -32,18 +32,18 @@ export function handleReady(
|
||||
);
|
||||
|
||||
// Start ready check in 2 seconds
|
||||
setTimeout(async () => {
|
||||
setTimeout(() => {
|
||||
eventHandlers.debug?.(
|
||||
"loop",
|
||||
`1. Running setTimeout in READY file.`,
|
||||
);
|
||||
await checkReady(payload, shardId, now);
|
||||
checkReady(payload, shardId, now);
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// Don't pass the shard itself because unavailableGuilds won't be updated by the GUILD_CREATE event
|
||||
/** This function checks if the shard is fully loaded */
|
||||
async function checkReady(payload: Ready, shardId: number, now: number) {
|
||||
function checkReady(payload: Ready, shardId: number, now: number) {
|
||||
const shard = ws.shards.get(shardId);
|
||||
if (!shard) return;
|
||||
|
||||
@@ -55,12 +55,12 @@ async function checkReady(payload: Ready, shardId: number, now: number) {
|
||||
loaded(shardId);
|
||||
} else {
|
||||
// Not all guilds were loaded but 10 seconds haven't passed so check again
|
||||
setTimeout(async () => {
|
||||
setTimeout(() => {
|
||||
eventHandlers.debug?.(
|
||||
"loop",
|
||||
`2. Running setTimeout in READY file.`,
|
||||
);
|
||||
await checkReady(payload, shardId, now);
|
||||
checkReady(payload, shardId, now);
|
||||
}, 2000);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@ const guildMemberQueue = new Map<
|
||||
let processingQueue = false;
|
||||
|
||||
/** Cache all guild members without need to worry about overwriting something. */
|
||||
// deno-lint-ignore require-await
|
||||
export async function cacheMembers(
|
||||
guildId: bigint,
|
||||
members: GuildMemberWithUser[],
|
||||
|
||||
Reference in New Issue
Block a user