mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
so freaking shitty dumnb aefiuhesr error fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { getGatewayBot } from "../../api/handlers/gateway.ts";
|
import { DiscordBotGatewayData } from "../../types/discord.ts";
|
||||||
import { Intents } from "../../types/options.ts";
|
import { Intents } from "../../types/options.ts";
|
||||||
import { Collection } from "../../util/collection.ts";
|
import { Collection } from "../../util/collection.ts";
|
||||||
import { ws } from "./ws.ts";
|
import { ws } from "./ws.ts";
|
||||||
@@ -26,7 +26,11 @@ export async function startGateway(options: StartGatewayOptions) {
|
|||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
|
|
||||||
const data = await getGatewayBot();
|
const data = await fetch(
|
||||||
|
`https://discord.com/api/gateway/bot`,
|
||||||
|
{ headers: { Authorization: ws.identifyPayload.token } },
|
||||||
|
).then((res) => res.json()) as DiscordBotGatewayData;
|
||||||
|
|
||||||
ws.maxShards = options.maxShards || data.shards;
|
ws.maxShards = options.maxShards || data.shards;
|
||||||
ws.lastShardID = options.lastShardID || data.shards - 1;
|
ws.lastShardID = options.lastShardID || data.shards - 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user