fix guild fetch members result on large guilds

This commit is contained in:
Skillz
2020-09-02 01:01:51 -04:00
parent f4d23957cb
commit 22da662dc3
3 changed files with 5 additions and 8 deletions
+3 -2
View File
@@ -36,8 +36,9 @@ import { identifyPayload } from "../module/client.ts";
import { requestAllMembers } from "../module/shardingManager.ts";
import { MemberCreatePayload } from "../types/member.ts";
import { cache } from "../utils/cache.ts";
import { createMember } from "../structures/member.ts";
import { createMember, Member } from "../structures/member.ts";
import { urlToBase64 } from "../utils/utils.ts";
import { Collection } from "../utils/collection.ts";
/** Gets an array of all the channels ids that are the children of this category. */
export function categoryChildrenIDs(guild: Guild, id: string) {
@@ -210,7 +211,7 @@ export async function getMembersByQuery(
return new Promise((resolve) => {
requestAllMembers(guild, resolve, { query: name, limit });
});
}) as Promise<Collection<string, Member>>;
}
/** Create an emoji in the server. Emojis and animated emojis have a maximum file size of 256kb. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a JSON status code. If a URL is provided to the image parameter, Discordeno will automatically convert it to a base64 string internally. */