mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
fix: fmt
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import { Collection, createGatewayManager, createRestManager, endpoints } from "../../deps.ts";
|
||||
import {
|
||||
DISCORD_TOKEN,
|
||||
EVENT_HANDLER_SECRET_KEY,
|
||||
REST_AUTHORIZATION_KEY,
|
||||
REST_PORT,
|
||||
} from "../../configs.ts";
|
||||
import { DISCORD_TOKEN, EVENT_HANDLER_SECRET_KEY, REST_AUTHORIZATION_KEY, REST_PORT } from "../../configs.ts";
|
||||
|
||||
// CREATE A SIMPLE MANAGER FOR REST
|
||||
const rest = createRestManager({
|
||||
@@ -43,8 +38,8 @@ async function startGateway() {
|
||||
gateway.sessionStartLimitRemaining = result.sessionStartLimit.remaining;
|
||||
gateway.sessionStartLimitResetAfter = result.sessionStartLimit.resetAfter;
|
||||
gateway.maxConcurrency = result.sessionStartLimit.maxConcurrency;
|
||||
gateway.maxShards = result.shards
|
||||
gateway.lastShardId = result.shards
|
||||
gateway.maxShards = result.shards;
|
||||
gateway.lastShardId = result.shards;
|
||||
|
||||
// PREPARE BUCKETS FOR IDENTIFYING
|
||||
gateway.prepareBuckets(gateway, 0, result.shards);
|
||||
@@ -124,7 +119,6 @@ async function startGateway() {
|
||||
|
||||
startGateway();
|
||||
|
||||
|
||||
setInterval(async () => {
|
||||
console.log("GW DEBUG", "[Resharding] Checking if resharding is needed.");
|
||||
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
BOT_ID,
|
||||
DISCORD_TOKEN,
|
||||
EVENT_HANDLER_PORT,
|
||||
EVENT_HANDLER_SECRET_KEY,
|
||||
EVENT_HANDLER_URL,
|
||||
} from "../../configs.ts";
|
||||
import { DISCORD_TOKEN, EVENT_HANDLER_PORT, EVENT_HANDLER_SECRET_KEY, EVENT_HANDLER_URL } from "../../configs.ts";
|
||||
import { Collection, createGatewayManager, DiscordReady, GatewayManager, GetGatewayBot } from "../../deps.ts";
|
||||
|
||||
let gateway: GatewayManager;
|
||||
@@ -53,7 +47,9 @@ function spawnGateway(shardId: number, options: Partial<GatewayManager>) {
|
||||
}
|
||||
|
||||
// DONT SEND THESE EVENTS USELESS TO BOT
|
||||
if (["GUILD_LOADED_DD"].includes(data.t)) return;
|
||||
if (["GUILD_LOADED_DD"].includes(data.t)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await fetch(`${EVENT_HANDLER_URL}:${EVENT_HANDLER_PORT}`, {
|
||||
headers: {
|
||||
@@ -67,7 +63,9 @@ function spawnGateway(shardId: number, options: Partial<GatewayManager>) {
|
||||
}),
|
||||
})
|
||||
// BELOW IS FOR DENO MEMORY LEAK
|
||||
.then((res) => res.text())
|
||||
.then((res) =>
|
||||
res.text()
|
||||
)
|
||||
.catch(() => null);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user