mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
fix: remaining errors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { identifyPayload } from "../../bot.ts";
|
||||
import { DiscordenoMember } from "../../structures/member.ts";
|
||||
import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts";
|
||||
import { RequestGuildMembers } from "../../types/guilds/request_guild_members.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
|
||||
@@ -15,7 +16,7 @@ import { Collection } from "../../util/collection.ts";
|
||||
export function fetchMembers(
|
||||
guildId: string,
|
||||
shardId: number,
|
||||
options?: FetchMembersOptions,
|
||||
options?: RequestGuildMembers
|
||||
) {
|
||||
// You can request 1 member without the intent
|
||||
if (
|
||||
@@ -33,3 +34,16 @@ export function fetchMembers(
|
||||
return requestAllMembers(guildId, shardId, resolve, options);
|
||||
}) as Promise<Collection<string, DiscordenoMember>>;
|
||||
}
|
||||
|
||||
function requestAllMembers(
|
||||
guildId: string,
|
||||
shardId: number,
|
||||
resolve: (
|
||||
value:
|
||||
| Collection<string, DiscordenoMember>
|
||||
| PromiseLike<Collection<string, DiscordenoMember>>
|
||||
) => void,
|
||||
options: any
|
||||
): void {
|
||||
throw new Error("Function not implemented.");
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Collection } from "../../util/collection.ts";
|
||||
export async function getMembersByQuery(
|
||||
guildId: string,
|
||||
name: string,
|
||||
limit = 1,
|
||||
limit = 1
|
||||
) {
|
||||
const guild = await cacheHandlers.get("guilds", guildId);
|
||||
if (!guild) return;
|
||||
@@ -21,3 +21,16 @@ export async function getMembersByQuery(
|
||||
});
|
||||
}) as Promise<Collection<string, DiscordenoMember>>;
|
||||
}
|
||||
|
||||
function requestAllMembers(
|
||||
id: string,
|
||||
shardId: number,
|
||||
resolve: (
|
||||
value:
|
||||
| Collection<string, DiscordenoMember>
|
||||
| PromiseLike<Collection<string, DiscordenoMember>>
|
||||
) => void,
|
||||
arg3: { query: string; limit: number }
|
||||
): void {
|
||||
throw new Error("Function not implemented.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user