From 28424ed95030e700f9aa8d6f4305da045f260a39 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno Date: Sun, 23 May 2021 13:43:38 -0500 Subject: Fix: No more type casting required, rather take the gernics --- src/util/Member.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/Member.ts') diff --git a/src/util/Member.ts b/src/util/Member.ts index b15eef69..d03a8f12 100644 --- a/src/util/Member.ts +++ b/src/util/Member.ts @@ -39,7 +39,7 @@ export async function isMember(user_id: string, guild_id: string) { export async function addMember(user_id: string, guild_id: string, cache?: { guild?: GuildDocument }) { const user = await getPublicUser(user_id, { guilds: true }); - const { maxGuilds } = (Config.apiConfig.getAll() as Config.DefaultOptions).limits.user; + const { maxGuilds } = Config.apiConfig.getAll().limits.user; if (user.guilds.length >= maxGuilds) { throw new HTTPError(`You are at the ${maxGuilds} server limit.`, 403); } -- cgit 1.5.1