From 05057b922a84c6b0331357867dfa50166320b318 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno Date: Fri, 21 May 2021 18:18:58 -0500 Subject: Config: Refactor config method, so we have a new get all option, fix issues in configurations --- src/util/Member.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/util/Member.ts') diff --git a/src/util/Member.ts b/src/util/Member.ts index 87c3e6e1..2842298d 100644 --- a/src/util/Member.ts +++ b/src/util/Member.ts @@ -39,8 +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 limitsUserProperties = Config.apiConfig.get('limits.user', {maxGuilds: 100, masxUsername: 32, maxFriends: 1000}) as Config.DefaultOptions; - const { maxGuilds } = limitsUserProperties.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