fix: fetch members imports

This commit is contained in:
Skillz4Killz
2021-04-03 16:38:34 -04:00
parent cc46698245
commit 4717faa7ba
+3 -1
View File
@@ -2,6 +2,8 @@ import { identifyPayload } from "../../bot.ts";
import { Member } from "../../structures/mod.ts"; import { Member } from "../../structures/mod.ts";
import { Collection } from "../../util/collection.ts"; import { Collection } from "../../util/collection.ts";
import { requestAllMembers } from "../../ws/shard_manager.ts"; import { requestAllMembers } from "../../ws/shard_manager.ts";
import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts";
import { Errors } from "../../types/misc/errors.ts";
/** /**
* ⚠️ BEGINNER DEVS!! YOU SHOULD ALMOST NEVER NEED THIS AND YOU CAN GET FROM cache.members.get() * ⚠️ BEGINNER DEVS!! YOU SHOULD ALMOST NEVER NEED THIS AND YOU CAN GET FROM cache.members.get()
@@ -19,7 +21,7 @@ export function fetchMembers(
// You can request 1 member without the intent // You can request 1 member without the intent
if ( if (
(!options?.limit || options.limit > 1) && (!options?.limit || options.limit > 1) &&
!(identifyPayload.intents && Intents.GUILD_MEMBERS) !(identifyPayload.intents && DiscordGatewayIntents.GUILD_MEMBERS)
) { ) {
throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS); throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS);
} }