Merge pull request #1713 from Skillz4Killz/fp-attempt-9001

Fp attempt 9001
This commit is contained in:
Skillz4Killz
2021-11-05 13:23:02 -04:00
committed by GitHub

View File

@@ -395,7 +395,7 @@ export function createGatewayManager(
$os: options.$os ?? "linux",
$browser: options.$browser ?? "Discordeno",
$device: options.$device ?? "Discordeno",
intents: options.intents ?? 0,
intents: (Array.isArray(options.intents) ? options.intents.reduce((bits, next) => (bits |= DiscordGatewayIntents[next]), 0) : options.intents) ?? 0,
shard: options.shard ?? [0, options.shardsRecommended ?? 1],
urlWSS: options.urlWSS ?? "wss://gateway.discord.gg/?v=9&encoding=json",
shardsRecommended: options.shardsRecommended ?? 1,
@@ -894,7 +894,7 @@ export interface GatewayManager {
$os: string;
$browser: string;
$device: string;
intents: number;
intents: number | (keyof typeof DiscordGatewayIntents)[];
shard: [number, number];
/** The WSS URL that can be used for connecting to the gateway. */