diff --git a/src/bot.ts b/src/bot.ts index 07d00846a..a4ba8c702 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -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. */