fix fetch members test

This commit is contained in:
Skillz4Killz
2021-10-30 20:29:02 +00:00
committed by GitHub
parent d4428be2e5
commit 8c664d65dd
3 changed files with 4 additions and 3 deletions
+2
View File
@@ -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);
+2 -2
View File
@@ -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
View File
@@ -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.
*