summary refs log tree commit diff
path: root/src/util/Member.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-23 20:48:25 +0200
committerGitHub <noreply@github.com>2021-05-23 20:48:25 +0200
commite1f0eb3c2a0b302641b0b88afcd8d29d85821a2c (patch)
tree29c5d85351363f7f189a61e2da52c214e597c0dd /src/util/Member.ts
parentMerge pull request #146 from luth31/upstream (diff)
parentFix: No more type casting required, rather take the gernics (diff)
downloadserver-e1f0eb3c2a0b302641b0b88afcd8d29d85821a2c.tar.xz
Merge pull request #147 from DiegoMagdaleno/master
New way to do config no more hardcoded localhost
Diffstat (limited to 'src/util/Member.ts')
-rw-r--r--src/util/Member.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/Member.ts b/src/util/Member.ts

index e6df5d2c..d03a8f12 100644 --- a/src/util/Member.ts +++ b/src/util/Member.ts
@@ -14,7 +14,7 @@ import { } from "@fosscord/server-util"; import { HTTPError } from "lambert-server"; -import Config from "./Config"; +import * as Config from "./Config"; import { emitEvent } from "./Event"; import { getPublicUser } from "./User"; @@ -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.get().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); }