Use cacheHandler instead of cache

This commit is contained in:
ayntee
2020-11-14 17:18:28 +04:00
parent a42b62bacc
commit 8d7157cc60
+1 -2
View File
@@ -37,7 +37,6 @@ import { MemberCreatePayload } from "../types/member.ts";
import { Intents } from "../types/options.ts"; import { Intents } from "../types/options.ts";
import { Permissions } from "../types/permission.ts"; import { Permissions } from "../types/permission.ts";
import { RoleData } from "../types/role.ts"; import { RoleData } from "../types/role.ts";
import { cache } from "../utils/cache.ts";
import { formatImageURL } from "../utils/cdn.ts"; import { formatImageURL } from "../utils/cdn.ts";
import { Collection } from "../utils/collection.ts"; import { Collection } from "../utils/collection.ts";
import { botHasPermission, calculateBits } from "../utils/permissions.ts"; import { botHasPermission, calculateBits } from "../utils/permissions.ts";
@@ -648,7 +647,7 @@ export async function createGuildFromTemplate(
templateCode: string, templateCode: string,
data: CreateGuildFromTemplate, data: CreateGuildFromTemplate,
) { ) {
if (cache.guilds.size >= 10) { if (cacheHandlers.size("guilds") >= 10) {
throw new Error( throw new Error(
"This function can only be used by bots in less than 10 guilds.", "This function can only be used by bots in less than 10 guilds.",
); );