fix buggs

This commit is contained in:
ITOH
2021-05-27 17:19:42 +02:00
parent 7f280bd17b
commit 12691f2567
2 changed files with 5 additions and 3 deletions

View File

@@ -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`;

View File

@@ -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 = {