mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
fix buggs
This commit is contained in:
@@ -5,13 +5,14 @@ import { DiscordGatewayIntents } from "./types/gateway/gateway_intents.ts";
|
||||
import { snowflakeToBigint } from "./util/bigint.ts";
|
||||
import { GATEWAY_VERSION } from "./util/constants.ts";
|
||||
import { ws } from "./ws/ws.ts";
|
||||
import { dispatchRequirements } from "./util/dispatch_requirements.ts";
|
||||
|
||||
// deno-lint-ignore prefer-const
|
||||
export let secretKey = "";
|
||||
export let botId = 0n;
|
||||
export let applicationId = 0n;
|
||||
|
||||
export let eventHandlers: EventHandlers = {};
|
||||
export let eventHandlers: EventHandlers = { dispatchRequirements };
|
||||
|
||||
export let proxyWSURL = `wss://gateway.discord.gg`;
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ export function guildSweeper(guild: DiscordenoGuild) {
|
||||
|
||||
// This is inactive guild. Not a single thing has happened for atleast 30 minutes.
|
||||
// Not a reaction, not a message, not any event!
|
||||
cache.guilds.delete(guild.id);
|
||||
cache.dispatchedGuildIds.add(guild.id);
|
||||
|
||||
// Remove all channel if they were dispatched
|
||||
@@ -74,7 +73,9 @@ export function guildSweeper(guild: DiscordenoGuild) {
|
||||
});
|
||||
|
||||
// Reset activity for next interval
|
||||
cache.activeGuildIds.clear();
|
||||
cache.activeGuildIds.delete(guild.id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
export let cacheHandlers = {
|
||||
|
||||
Reference in New Issue
Block a user