diff --git a/src/helpers/members/fetch_members.ts b/src/helpers/members/fetch_members.ts index 8ce49fd29..cb05f6327 100644 --- a/src/helpers/members/fetch_members.ts +++ b/src/helpers/members/fetch_members.ts @@ -17,7 +17,8 @@ import { ws } from "../../ws/ws.ts"; */ export function fetchMembers(guildId: bigint, shardId: number, options?: Omit) { // You can request 1 member without the intent - if ((!options?.limit || options.limit > 1) && !(ws.identifyPayload.intents & DiscordGatewayIntents.GuildMembers)) { + // Check if intents is not 0 as proxy ws won't set intents in other instances + if (ws.identifyPayload.intents && (!options?.limit || options.limit > 1) && !(ws.identifyPayload.intents & DiscordGatewayIntents.GuildMembers)) { throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS); } diff --git a/src/helpers/members/get_members.ts b/src/helpers/members/get_members.ts index 768cba54e..5de01de80 100644 --- a/src/helpers/members/get_members.ts +++ b/src/helpers/members/get_members.ts @@ -21,7 +21,8 @@ import { ws } from "../../ws/ws.ts"; * GW(fetchMembers): 120/m(PER shard) rate limit. Meaning if you have 8 shards your limit is 960/m. */ export async function getMembers(guildId: bigint, options?: ListGuildMembers & { addToCache?: boolean }) { - if (!(ws.identifyPayload.intents && DiscordGatewayIntents.GuildMembers)) { + // Check if intents is not 0 as proxy ws won't set intents in other instances + if (ws.identifyPayload.intents && !(ws.identifyPayload.intents & DiscordGatewayIntents.GuildMembers)) { throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS); }