mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
+8
-3
@@ -10,9 +10,14 @@ export interface CacheData {
|
|||||||
members: Collection<string, Member>;
|
members: Collection<string, Member>;
|
||||||
unavailableGuilds: Collection<string, number>;
|
unavailableGuilds: Collection<string, number>;
|
||||||
presences: Collection<string, PresenceUpdatePayload>;
|
presences: Collection<string, PresenceUpdatePayload>;
|
||||||
// TODO: The type Collection's second provided generic [function] should have a definite shape.
|
fetchAllMembersProcessingRequests: Collection<
|
||||||
// deno-lint-ignore ban-types
|
string,
|
||||||
fetchAllMembersProcessingRequests: Collection<string, Function>;
|
(
|
||||||
|
value:
|
||||||
|
| Collection<string, Member>
|
||||||
|
| PromiseLike<Collection<string, Member>>,
|
||||||
|
) => void
|
||||||
|
>;
|
||||||
executedSlashCommands: Collection<string, string>;
|
executedSlashCommands: Collection<string, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { controllers } from "../api/controllers/mod.ts";
|
import { controllers } from "../api/controllers/mod.ts";
|
||||||
import { Guild } from "../api/structures/guild.ts";
|
import { Guild } from "../api/structures/guild.ts";
|
||||||
|
import { Member } from "../api/structures/mod.ts";
|
||||||
import { eventHandlers, IdentifyPayload } from "../bot.ts";
|
import { eventHandlers, IdentifyPayload } from "../bot.ts";
|
||||||
import {
|
import {
|
||||||
DiscordBotGatewayData,
|
DiscordBotGatewayData,
|
||||||
@@ -8,6 +9,7 @@ import {
|
|||||||
GatewayOpcode,
|
GatewayOpcode,
|
||||||
} from "../types/mod.ts";
|
} from "../types/mod.ts";
|
||||||
import { cache } from "../util/cache.ts";
|
import { cache } from "../util/cache.ts";
|
||||||
|
import { Collection } from "../util/collection.ts";
|
||||||
import { BotStatusRequest, delay } from "../util/utils.ts";
|
import { BotStatusRequest, delay } from "../util/utils.ts";
|
||||||
import {
|
import {
|
||||||
botGatewayStatusRequest,
|
botGatewayStatusRequest,
|
||||||
@@ -90,9 +92,9 @@ export async function handleDiscordPayload(
|
|||||||
|
|
||||||
export function requestAllMembers(
|
export function requestAllMembers(
|
||||||
guild: Guild,
|
guild: Guild,
|
||||||
// TODO: The parameter "resolve" should have a "stronger" type.
|
resolve: (
|
||||||
// deno-lint-ignore ban-types
|
value: Collection<string, Member> | PromiseLike<Collection<string, Member>>,
|
||||||
resolve: Function,
|
) => void,
|
||||||
options?: FetchMembersOptions,
|
options?: FetchMembersOptions,
|
||||||
) {
|
) {
|
||||||
const nonce = `${guild.id}-${Date.now()}`;
|
const nonce = `${guild.id}-${Date.now()}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user