mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fix fetch members test
This commit is contained in:
@@ -38,6 +38,7 @@ export function createCache(
|
|||||||
// threads: tableCreator("threads"),
|
// threads: tableCreator("threads"),
|
||||||
unavailableGuilds: tableCreator("unavailableGuilds"),
|
unavailableGuilds: tableCreator("unavailableGuilds"),
|
||||||
executedSlashCommands: new Set(),
|
executedSlashCommands: new Set(),
|
||||||
|
fetchAllMembersProcessingRequests: new Map(),
|
||||||
} as AsyncCache;
|
} as AsyncCache;
|
||||||
|
|
||||||
cache.execute = async function () {
|
cache.execute = async function () {
|
||||||
@@ -58,6 +59,7 @@ export function createCache(
|
|||||||
// threads: tableCreator("threads"),
|
// threads: tableCreator("threads"),
|
||||||
unavailableGuilds: tableCreator("unavailableGuilds"),
|
unavailableGuilds: tableCreator("unavailableGuilds"),
|
||||||
executedSlashCommands: new Set(),
|
executedSlashCommands: new Set(),
|
||||||
|
fetchAllMembersProcessingRequests: new Map(),
|
||||||
} as Cache;
|
} as Cache;
|
||||||
|
|
||||||
cache.execute = createExecute(cache);
|
cache.execute = createExecute(cache);
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ export function fetchMembers(
|
|||||||
bot.gateway.sendShardMessage(bot.gateway, shardId, {
|
bot.gateway.sendShardMessage(bot.gateway, shardId, {
|
||||||
op: DiscordGatewayOpcodes.RequestGuildMembers,
|
op: DiscordGatewayOpcodes.RequestGuildMembers,
|
||||||
d: {
|
d: {
|
||||||
guild_id: guildId,
|
guild_id: guildId.toString(),
|
||||||
// If a query is provided use it, OR if a limit is NOT provided use ""
|
// If a query is provided use it, OR if a limit is NOT provided use ""
|
||||||
query: options?.query || (options?.limit ? undefined : ""),
|
query: options?.query || (options?.limit ? undefined : ""),
|
||||||
limit: options?.limit || 0,
|
limit: options?.limit || 0,
|
||||||
presences: options?.presences || false,
|
presences: options?.presences || false,
|
||||||
user_ids: options?.userIds,
|
user_ids: options?.userIds?.map(id => id.toString()),
|
||||||
nonce,
|
nonce,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { GuildMemberWithUser } from "../../types/members/guild_member.ts";
|
import type { GuildMemberWithUser } from "../../types/members/guild_member.ts";
|
||||||
import type { Bot } from "../../bot.ts";
|
import type { Bot } from "../../bot.ts";
|
||||||
import type { SnakeCasedPropertiesDeep } from "../../types/util.ts";
|
|
||||||
|
|
||||||
/** Returns a guild member object for the specified user.
|
/** Returns a guild member object for the specified user.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user