mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
fix: fetch members imports
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user