mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 00:37:22 +00:00
fix: check for the GUILD_MEMBERS intent when requesting members (#5229)
This commit is contained in:
@@ -450,7 +450,7 @@ export function createGatewayManager(options: CreateGatewayManagerOptions): Gate
|
||||
async requestMembers(guildId, options) {
|
||||
const shardId = gateway.calculateShardId(guildId);
|
||||
|
||||
if (gateway.intents && (!options?.limit || options.limit > 1) && !(gateway.intents & GatewayIntents.GuildMembers))
|
||||
if ((!options?.limit || options.limit > 1) && (gateway.intents & GatewayIntents.GuildMembers) === 0)
|
||||
throw new Error('Cannot fetch more then 1 member without the GUILD_MEMBERS intent');
|
||||
|
||||
gateway.logger.debug(`[Gateway] requestMembers guildId: ${guildId} -> data: ${JSON.stringify(options)}`);
|
||||
|
||||
Reference in New Issue
Block a user