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"),
|
||||
unavailableGuilds: tableCreator("unavailableGuilds"),
|
||||
executedSlashCommands: new Set(),
|
||||
fetchAllMembersProcessingRequests: new Map(),
|
||||
} as AsyncCache;
|
||||
|
||||
cache.execute = async function () {
|
||||
@@ -58,6 +59,7 @@ export function createCache(
|
||||
// threads: tableCreator("threads"),
|
||||
unavailableGuilds: tableCreator("unavailableGuilds"),
|
||||
executedSlashCommands: new Set(),
|
||||
fetchAllMembersProcessingRequests: new Map(),
|
||||
} as Cache;
|
||||
|
||||
cache.execute = createExecute(cache);
|
||||
|
||||
@@ -40,12 +40,12 @@ export function fetchMembers(
|
||||
bot.gateway.sendShardMessage(bot.gateway, shardId, {
|
||||
op: DiscordGatewayOpcodes.RequestGuildMembers,
|
||||
d: {
|
||||
guild_id: guildId,
|
||||
guild_id: guildId.toString(),
|
||||
// If a query is provided use it, OR if a limit is NOT provided use ""
|
||||
query: options?.query || (options?.limit ? undefined : ""),
|
||||
limit: options?.limit || 0,
|
||||
presences: options?.presences || false,
|
||||
user_ids: options?.userIds,
|
||||
user_ids: options?.userIds?.map(id => id.toString()),
|
||||
nonce,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { GuildMemberWithUser } from "../../types/members/guild_member.ts";
|
||||
import type { Bot } from "../../bot.ts";
|
||||
import type { SnakeCasedPropertiesDeep } from "../../types/util.ts";
|
||||
|
||||
/** Returns a guild member object for the specified user.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user