mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fix: bunch of imports that were missing
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { urlToBase64 } from "../../util/utils.ts";
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import {
|
||||
requireBotChannelPermissions,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { identifyPayload } from "../../bot.ts";
|
||||
import { Member } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { requestAllMembers } from "../../ws/shard_manager.ts";
|
||||
|
||||
@@ -19,7 +21,7 @@ export function fetchMembers(
|
||||
// You can request 1 member without the intent
|
||||
if (
|
||||
(!options?.limit || options.limit > 1) &&
|
||||
!(identifyPayload.intents && Intents.GUILD_MEMBERS)
|
||||
!(identifyPayload.intents && DiscordGatewayIntents.GUILD_MEMBERS)
|
||||
) {
|
||||
throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { RequestManager } from "../../rest/request_manager.ts";
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
|
||||
@@ -2,6 +2,9 @@ import { identifyPayload } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { Member, structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts";
|
||||
import { DiscordGuildMember } from "../../types/guilds/guild_member.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
|
||||
@@ -14,7 +17,7 @@ import { endpoints } from "../../util/constants.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: string, options?: GetMemberOptions) {
|
||||
if (!(identifyPayload.intents && Intents.GUILD_MEMBERS)) {
|
||||
if (!(identifyPayload.intents && DiscordGatewayIntents.GUILD_MEMBERS)) {
|
||||
throw new Error(Errors.MISSING_INTENT_GUILD_MEMBERS);
|
||||
}
|
||||
|
||||
@@ -51,7 +54,7 @@ export async function getMembers(guildId: string, options?: GetMemberOptions) {
|
||||
? `&after=${options.after}`
|
||||
: ""
|
||||
}`,
|
||||
)) as MemberCreatePayload[];
|
||||
)) as DiscordGuildMember[];
|
||||
|
||||
const memberStructures = await Promise.all(
|
||||
result.map(async (member) => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { botId } from "../../bot.ts";
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import {
|
||||
highestRole,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||
import { camelKeysToSnakeCase } from "../../util/utils.ts";
|
||||
|
||||
Reference in New Issue
Block a user