fix: bunch of imports that were missing

This commit is contained in:
Skillz4Killz
2021-04-03 23:30:48 +00:00
committed by GitHub
parent cc46698245
commit 408120c508
24 changed files with 81 additions and 59 deletions
+5 -2
View File
@@ -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) => {